政企超链接开始集成

This commit is contained in:
hoteas
2022-03-06 23:55:14 +08:00
parent b5f6a33f07
commit e200e0a370
6 changed files with 52 additions and 31 deletions
+8 -3
View File
@@ -20,7 +20,7 @@ var User = Ctr{
},
"test": func(this *Context) {
fmt.Println(this.SessionId)
//this.Session("user_id", 1)
this.Session("user_id", 1)
wechat := this.Db.Get("wechat", "*")
this.Session("wechatInfo", wechat)
this.Display(0, "开始测试")
@@ -33,8 +33,13 @@ var User = Ctr{
if this.Session("user_id").Data == nil {
if this.Session("wechatInfo").Data != nil {
this.Display(6, "需要认证")
return
wechat := this.Db.Get("wechat", "status", Map{"id": this.Session("wechatInfo").ToMap().GetCeilInt("id")})
if wechat.GetCeilInt("status") == 0 {
this.Display(6, "需要认证")
return
}
}
this.Display(2, "还没有登录")
return