|
@@ -46,7 +46,7 @@ func (this *WechatCommonController) WechatLoginByGzh() {
|
|
|
}
|
|
|
if item.Errcode != 0 {
|
|
|
br.Msg = "获取用户信息失败"
|
|
|
- br.ErrMsg = "获取access_token 失败 errcode:" + strconv.Itoa(item.Errcode) + " ;errmsg:" + item.Errmsg+"appid:" + utils.WxPublicAppId+"secret:"+utils.WxPublicAppSecret
|
|
|
+ br.ErrMsg = "获取access_token 失败 errcode:" + strconv.Itoa(item.Errcode) + " ;errmsg:" + item.Errmsg + "appid:" + utils.WxPublicAppId + "secret:" + utils.WxPublicAppSecret
|
|
|
return
|
|
|
}
|
|
|
openId := item.Openid
|
|
@@ -127,14 +127,14 @@ func (this *WechatCommonController) WechatLoginByGzh() {
|
|
|
UnionId: unionId,
|
|
|
Subscribe: 0,
|
|
|
NickName: wxUserInfo.Nickname,
|
|
|
- RealName: "",
|
|
|
+ RealName: "",
|
|
|
Sex: wxUserInfo.Sex,
|
|
|
Province: wxUserInfo.Province,
|
|
|
City: wxUserInfo.City,
|
|
|
Country: wxUserInfo.Country,
|
|
|
Headimgurl: wxUserInfo.Headimgurl,
|
|
|
- CreateTime: time.Now(),
|
|
|
- CreatePlatform: 12,
|
|
|
+ CreateTime: time.Now(),
|
|
|
+ CreatePlatform: 12,
|
|
|
SessionKey: wxUserInfo.SessionKey,
|
|
|
}
|
|
|
if mfyxUserRecord == nil {
|
|
@@ -416,6 +416,15 @@ func (this *WechatCommonController) Notify() {
|
|
|
if method == "POST" {
|
|
|
body := this.Ctx.Input.RequestBody
|
|
|
utils.FileLog.Info("wechat notify:" + string(body))
|
|
|
+
|
|
|
+
|
|
|
+ itemApiLog := new(models.CygxThreeApiLog)
|
|
|
+ itemApiLog.CreateTime = time.Now()
|
|
|
+ itemApiLog.Source = 1
|
|
|
+ itemApiLog.Url = this.Ctx.Input.URI()
|
|
|
+ itemApiLog.Body = ""
|
|
|
+ itemApiLog.Result = string(body)
|
|
|
+ go models.AddCygxThreeApiLog(itemApiLog)
|
|
|
item := new(models.Notify)
|
|
|
err := xml.Unmarshal(body, &item)
|
|
|
if err != nil {
|