Sfoglia il codice sorgente

兼容备用小程序

317699326@qq.com 1 settimana fa
parent
commit
0b27005961
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      controller/community/question.go

+ 3 - 1
controller/community/question.go

@@ -484,6 +484,8 @@ func QuestionTransfer(c *gin.Context) {
 // @failure 400 {string} string "操作失败"
 // @Router /question/stop [post]
 func QuestionStop(c *gin.Context) {
+	// 是否为备用小程序
+	copyYb := c.Request.Header.Get("CopyYb")
 	var req request.QuestionStopReq
 	if err := c.ShouldBind(&req); err != nil {
 		response.Fail("参数有误", c)
@@ -500,7 +502,7 @@ func QuestionStop(c *gin.Context) {
 	// 敏感词校验, 只有小程序的用户才能走敏感词过滤接口
 	userinfo := user.GetInfoByClaims(c)
 	if userinfo.RecordInfo.OpenID != "" && userinfo.RecordInfo.CreatePlatform == 6 {
-		checkResult, e := wx_app.MsgSecCheck(userinfo.RecordInfo.OpenID, req.Reason)
+		checkResult, e := wx_app.MsgSecCheck(userinfo.RecordInfo.OpenID, req.Reason, copyYb)
 		if e == nil {
 			if checkResult.Result != nil && checkResult.Result.Suggest != "pass" {
 				errMsg := "含有违禁词, 不允许发布: " + checkResult.Result.Suggest + ", 命中标签: " + strconv.Itoa(checkResult.Result.Label)