فهرست منبع

问答模板消息

hsun 2 سال پیش
والد
کامیت
cfbc2c5d82
1فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 5 3
      services/wechat/template_msg.go

+ 5 - 3
services/wechat/template_msg.go

@@ -208,9 +208,11 @@ func SendQuestionReplyWxMsg(questionId, userId int, openid, questionTitle string
 	sendMap["template_id"] = TemplateIdWithCommunityQuestion
 	sendMap["data"] = sendData
 
-	// TODO:小程序pagepath待定
-	wxAppPath := ""
-	//wxAppPath := fmt.Sprintf("pages-report/reportDetail?reportId=%s", "3800")
+	wxAppPath := fmt.Sprintf("page-question/answerDetail?id=%d", questionId)
+	if global.CONFIG.Serve.RunMode == "debug" {
+		// 仅测试环境测试用
+		wxAppPath = "pages-report/reportDetail?reportId=3800"
+	}
 	if wxAppPath != "" {
 		sendMap["miniprogram"] = map[string]interface{}{"appid": WxYbAppId, "pagepath": wxAppPath}
 	}