|
@@ -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, //用户union_id
|
|
|
Subscribe: 0,
|
|
|
NickName: wxUserInfo.Nickname, //用户昵称,最大长度:32
|
|
|
- RealName: "", //用户实际名称,最大长度:32
|
|
|
+ RealName: "", //用户实际名称,最大长度:32
|
|
|
Sex: wxUserInfo.Sex, //普通用户性别,1为男性,2为女性
|
|
|
Province: wxUserInfo.Province, //普通用户个人资料填写的省份,最大长度:30
|
|
|
City: wxUserInfo.City, //普通用户个人资料填写的城市,最大长度:30
|
|
|
Country: wxUserInfo.Country, //国家,如中国为CN,最大长度:30
|
|
|
Headimgurl: wxUserInfo.Headimgurl, //用户第三方(微信)头像,最大长度:512
|
|
|
- CreateTime: time.Now(), //创建时间,关系添加时间、用户授权时间
|
|
|
- CreatePlatform: 12, //注册平台,1:日度点评公众号,2:管理后台,3:pc端网站,4:查研观向小程序;默认:1
|
|
|
+ CreateTime: time.Now(), //创建时间,关系添加时间、用户授权时间
|
|
|
+ CreatePlatform: 12, //注册平台,1:日度点评公众号,2:管理后台,3:pc端网站,4:查研观向小程序;默认:1
|
|
|
SessionKey: wxUserInfo.SessionKey, //微信小程序会话密钥,最大长度:255
|
|
|
}
|
|
|
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 {
|