政企超链接开始集成

This commit is contained in:
hoteas
2022-02-28 08:53:38 +08:00
parent 2a98f0dcad
commit 42f91d57ff
8 changed files with 158 additions and 58 deletions
+4 -3
View File
@@ -90,7 +90,7 @@ var Wechat = Ctr{
auth := wx.GetOauth(this.Req, this.Resp)
resToken, err := auth.GetUserAccessToken(this.Req.FormValue("code"))
if err != nil {
this.Display(6, "code错误")
this.Display(5, "code错误")
return
}
@@ -98,7 +98,7 @@ var Wechat = Ctr{
user := this.Db.Get("wechat", Map{"[><]user": "wechat.user_id=user.id"}, "user.id,user.state", Map{"openid": resToken.OpenID})
if user != nil && user.GetCeilInt("state") == 0 {
this.Session("user_id", user.Get("id"))
this.Display(0, 0)
this.Display(0, Map{"type": 0, "token": this.SessionId})
return
}
//getUserInfo
@@ -139,7 +139,8 @@ var Wechat = Ctr{
this.Session("wechatInfo", wechatInfo)
this.Display(0, 1)
//this.Display(0, 1)
this.Display(0, Map{"type": 1, "token": this.SessionId})
},
//网页签名
"sign": func(this *Context) {