zwxi 1 рік тому
батько
коміт
350f2b812d

+ 3 - 0
controllers/base_auth_mobile.go

@@ -38,6 +38,7 @@ func (this *BaseAuthMobileController) Prepare() {
 	if method != "HEAD" {
 		if method == "POST" || method == "GET" {
 			authorization := this.Ctx.Input.Header("Authorization")
+			inviteCompany := this.Ctx.Input.Header("From")
 			if authorization == "" {
 				authorization = this.GetString("Authorization")
 			}
@@ -83,6 +84,8 @@ func (this *BaseAuthMobileController) Prepare() {
 					return
 				}
 				this.User = wxUser
+				wxUser.InviteCompany = inviteCompany
+				go services.AddCygxPageHistoryRecord(this.User, this.Ctx)
 			}
 		} else {
 			this.JSON(models.BaseResponse{Ret: 408, Msg: "请求异常,请联系客服!", ErrMsg: "POST之外的请求,暂不支持"}, false, false)

+ 1 - 1
services/wx_category_template_msg.go

@@ -318,7 +318,7 @@ func SendCommentWxCategoryTemplateMsg(req models.AddCygxArticleCommentReq, user
 		openIdArr = append(openIdArr, v.OpenId)
 	}
 
-	redirectUrl = utils.WX_MSG_PATH_YX_COMMENT_DETAIL + strconv.Itoa(msgId) + "&Stype=文章"
+	redirectUrl = utils.WX_MSG_PATH_YX_COMMENT_DETAIL + strconv.Itoa(msgId) + "&type=文章"
 
 	sendInfo := new(SendWxCategoryTemplate)
 	sendInfo.Keywords = keywords