测试
This commit is contained in:
@@ -30,17 +30,17 @@ var Project = Proj{
|
||||
this.Display(5, "登录失败")
|
||||
return
|
||||
}
|
||||
this.Session("id", user.GetCeilInt("id"))
|
||||
this.Session("name", name)
|
||||
this.Display(0, "登录成功")
|
||||
this.Session("admin_id", user.GetCeilInt("id"))
|
||||
this.Session("admin_name", name)
|
||||
this.Display(0, this.SessionId)
|
||||
},
|
||||
"logout": func(this *Context) {
|
||||
this.Session("id", nil)
|
||||
this.Session("name", nil)
|
||||
this.Session("admin_id", nil)
|
||||
this.Session("admin_name", nil)
|
||||
this.Display(0, "退出登录成功")
|
||||
},
|
||||
"info": func(that *Context) {
|
||||
re := that.Db.Get("admin", that.MakeCode.Info("admin"), Map{"id": that.Session("id").ToCeilInt()})
|
||||
re := that.Db.Get("admin", that.MakeCode.Info("admin"), Map{"id": that.Session("admin_id").ToCeilInt()})
|
||||
|
||||
if re == nil {
|
||||
that.Display(4, "找不到对应信息")
|
||||
|
||||
Reference in New Issue
Block a user