Compare commits

..

6 Commits

4 changed files with 8 additions and 3 deletions

View File

@@ -19,8 +19,8 @@ type changeStatusParam struct {
// changeUseAiModelParam
// @description: 修改使用的AI模型用的参数集
type changeUseAiModelParam struct {
WxId string `json:"wxid" binding:"required"` // 群Id或微信Id
Model string `json:"model" binding:"required"` // 模型代码
WxId string `json:"wxid" binding:"required"` // 群Id或微信Id
Model string `json:"model"` // 模型代码
}
// autoClearMembers

View File

@@ -1,4 +1,7 @@
system:
# 每日新闻接口 Token
# 获取地址: https://admin.alapi.cn/api_manager/token_manager
alApiToken: xxx
# 添加新好友或群之后通知给指定的人
newFriendNotify:
enable: true

View File

@@ -2,6 +2,7 @@ package config
// 系统配置
type system struct {
AlApiToken string `json:"alApiToken" yaml:"alApiToken"` // AL API Token
NewFriendNotify newFriendNotify `json:"newFriendNotify" yaml:"newFriendNotify"` // 新好友通知
DefaultRule defaultRule `json:"defaultRule" yaml:"defaultRule"` // 默认规则
}

View File

@@ -2,6 +2,7 @@ package utils
import (
"github.com/go-resty/resty/v2"
"go-wechat/config"
"go-wechat/model"
"log"
)
@@ -33,7 +34,7 @@ func (news) MorningPost() (records []string) {
res := resty.New()
resp, err := res.R().
SetHeader("Content-Type", "application/json;chartset=utf-8").
SetQueryParam("token", "cFoMZNNBxT4jQovS").
SetQueryParam("token", config.Conf.System.AlApiToken).
SetResult(&newsResp).
Post("https://v2.alapi.cn/api/zaobao")
if err != nil {