Bläddra i källkod

问答模板消息

hsun 2 år sedan
förälder
incheckning
cfbc2c5d82
1 ändrade filer med 5 tillägg och 3 borttagningar
  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}
 	}