|
@@ -9,6 +9,7 @@ import (
|
|
|
"fmt"
|
|
|
"html"
|
|
|
"strconv"
|
|
|
+ "time"
|
|
|
)
|
|
|
|
|
|
type WeChatController struct {
|
|
@@ -149,9 +150,10 @@ func (this *WeChatController) SendTemplateMsg() {
|
|
|
sendData := make(map[string]interface{})
|
|
|
sendData["first"] = fmt.Sprintf("Hi,最新一期%s已上线,欢迎查看", report.ClassifyNameFirst)
|
|
|
sendData["keyword1"] = map[string]interface{}{"value": fmt.Sprintf("弘则%s", report.ClassifyNameSecond), "color": "#173177"}
|
|
|
- sendData["keyword2"] = map[string]interface{}{"value": report.ContentSub, "color": "#173177"}
|
|
|
+ sendData["keyword2"] = map[string]interface{}{"value": report.Title, "color": "#173177"}
|
|
|
sendData["keyword3"] = map[string]interface{}{"value": report.PublishTime, "color": "#173177"}
|
|
|
sendData["keyword4"] = map[string]interface{}{"value": report.Abstract, "color": "#173177"}
|
|
|
+ sendData["remark"] = map[string]interface{}{"value": time.Now().Format(utils.FormatDate), "color": "#173177"}
|
|
|
err = services.SendMultiTemplateMsg(sendData, openIds, 1, reportId)
|
|
|
if err != nil {
|
|
|
br.Msg = "发送失败"
|