zk 2 роки тому
батько
коміт
eba2d3613e

+ 1 - 1
server/api/v1/autocode/problem_info.go

@@ -106,7 +106,7 @@ func (problemInfoApi *ProblemInfoApi) SendUser(c *gin.Context) {
 		}
 		msg := &message.TemplateMessage{
 			ToUser:     user.WechatId,
-			TemplateID: "DAyIWY0UUaqGxMG13MUtNCkNFKEe719sp75P0tT7FS4",
+			TemplateID: global.GVA_CONFIG.Wxxcx.Msgid,
 			Data: map[string]*message.TemplateDataItem{
 				"first":    {Value: "有新的站点问题"},
 				"keyword1": {Value: oper.Username},

+ 2 - 2
server/api/v1/system/wechat.go

@@ -38,7 +38,7 @@ func (b *WechatApi) Auth(c *gin.Context) {
 				userSys.WechatId = userInfo.OpenID
 				userService.SetUserInfo(userSys)
 			}
-			c.String(http.StatusOK, "您已成功授权《经开创城进行时》!")
+			c.String(http.StatusOK, "您已成功授权《"+global.GVA_CONFIG.Wxxcx.Name+"创城进行时》!")
 		}
 	}
 }
@@ -71,7 +71,7 @@ func (b *WechatApi) Req(c *gin.Context) {
 			} else {
 				global.GVA_LOG.Info("用户已存在", zap.Any("err", err), zap.Any("sysUser", sysUser))
 			}
-			text := message.NewText("【经开创城进行时】感谢您的关注!")
+			text := message.NewText("【" + global.GVA_CONFIG.Wxxcx.Name + "创城进行时】感谢您的关注!")
 			//text := message.NewText("【经开创城进行时】感谢您的关注! \r\n <a href='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx66e0fbb5a735bcc4&redirect_uri=" + url.QueryEscape(
 			//	global.GVA_CONFIG.Wxxcx.AuthUrl) + "/wechat/auth&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect'>点我授权</a>")
 			return &message.Reply{MsgType: message.MsgTypeText, MsgData: text}

+ 2 - 0
server/config.yaml

@@ -89,6 +89,8 @@ wxxcx:
   secret: fdf155c29d4f6bfb104efdfcd9e99a52
   wxid: wx66e0fbb5a735bcc4
   wxkey: 6d9a776f8f7a485db4b1813be8c6891e
+  msgid: ADfLDnZFI4g39m1RZyDO8CKNue3Dx4LblozriSpn7jw
+  name: 崇礼
   authUrl: https://work.zk1006.com/api
 zap:
   level: info

+ 2 - 0
server/config/wxxcx.go

@@ -6,4 +6,6 @@ type Wxxcx struct {
 	Wxid    string `mapstructure:"wxid" json:"wxid" yaml:"wxid"`
 	Wxkey   string `mapstructure:"wxkey" json:"wxkey" yaml:"wxkey"`
 	AuthUrl string `mapstructure:"authUrl" json:"authUrl" yaml:"authUrl"`
+	Msgid   string `mapstructure:"msgid" json:"msgid" yaml:"msgid"`
+	Name    string `mapstructure:"name" json:"name" yaml:"name"`
 }