政企超链接开始集成
This commit is contained in:
+8
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user