|
@@ -5,7 +5,6 @@ import (
|
|
|
"encoding/json"
|
|
|
"errors"
|
|
|
"eta/eta_mini_bridge/models"
|
|
|
- "eta/eta_mini_bridge/services/alarm_msg"
|
|
|
"eta/eta_mini_bridge/utils"
|
|
|
"fmt"
|
|
|
"io"
|
|
@@ -139,22 +138,17 @@ func SendMultiTemplateMsg(sendData map[string]interface{}, items []*OpenIdList,
|
|
|
ws := GetWxChat()
|
|
|
accessToken, err := ws.GetAccessToken()
|
|
|
if err != nil {
|
|
|
- alarm_msg.SendAlarmMsg("获取微信token失败, Err:"+err.Error(), 1)
|
|
|
+ utils.ApiLog.Info("获取微信token失败, Err:"+err.Error(), 1)
|
|
|
+ // alarm_msg.SendAlarmMsg("获取微信token失败, Err:"+err.Error(), 1)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- var wxAppPath string
|
|
|
- if utils.RunMode == "debug" {
|
|
|
- wxAppPath = fmt.Sprintf("pages-question/answerDetail?id=%d", 3800)
|
|
|
- } else {
|
|
|
- wxAppPath = fmt.Sprintf("pages-report/reportDetail/index?id=%d", reportId)
|
|
|
- }
|
|
|
sendMap := make(map[string]interface{})
|
|
|
for _, item := range items {
|
|
|
sendMap["template_id"] = utils.TEMPLATE_ID_BY_PRODUCT
|
|
|
sendMap["miniprogram"] = map[string]interface{}{
|
|
|
"appid": utils.WX_MINI_APPID,
|
|
|
- "pagepath": wxAppPath,
|
|
|
+ "pagepath": fmt.Sprintf("pages-report/reportDetail/index?id=%d", reportId),
|
|
|
}
|
|
|
sendMap["touser"] = item.OpenId
|
|
|
sendMap["data"] = sendData
|