Browse Source

问答模板消息

hsun 2 năm trước cách đây
mục cha
commit
cfbc2c5d82
1 tập tin đã thay đổi với 5 bổ sung3 xóa
  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}
 	}