🎨 修改订阅消息模板id

This commit is contained in:
loser 2024-07-03 17:07:51 +08:00
parent 61c0aaa35a
commit 2728a32064

View File

@ -74,17 +74,19 @@ func MiniappSendMsg(userId string, utId string) {
//判断context是否超过20个字符
if len(ut.Content)/3 >= 19 {
text := strings.Split(ut.Content, "药品")
text = text[1:]
for i := 1; i < len(text); i++ {
msgData := msg.SendRequest{
ToUser: user.WechatOpenId,
TemplateID: "PgxoZOOSDgBcmIGd_EVLDnYUmL3eu6NQTAZCsHQeuWY",
TemplateID: "BKyIwkt7HHEQoQ9ByrHqnHaGO5jq8d-MCp9YYGK23TE",
Page: "/pages/index/done",
MiniprogramState: msg.MiniprogramStateTrial,
Data: msg.SendData{
"thing1": msg.SendValue{Value: text[i]},
"time2": msg.SendValue{Value: ut.RemindTime},
"short_thing17": msg.SendValue{Value: ut.Frequency},
"time15": msg.SendValue{Value: time.Now().Format("2006-01-02 15:04:05")},
"thing2": msg.SendValue{Value: text[i]},
"time6": msg.SendValue{Value: ut.RemindTime},
"thing8": msg.SendValue{Value: ut.Frequency},
"thing3": msg.SendValue{Value: "用药详情请进入小程序待完成事项中查看"},
//"time15": msg.SendValue{Value: time.Now().Format("2006-01-02 15:04:05")},
},
}
@ -93,7 +95,7 @@ func MiniappSendMsg(userId string, utId string) {
} else {
msgData := msg.SendRequest{
ToUser: user.WechatOpenId,
TemplateID: "PgxoZOOSDgBcmIGd_EVLDnYUmL3eu6NQTAZCsHQeuWY",
TemplateID: "BKyIwkt7HHEQoQ9ByrHqnHaGO5jq8d-MCp9YYGK23TE",
Page: "/pages/index/done",
MiniprogramState: msg.MiniprogramStateTrial,
Data: msg.SendData{