This commit is contained in:
2021-09-12 05:35:14 +08:00
parent 62cf625fe9
commit 9c3ba81135
20 changed files with 36 additions and 63 deletions
+6 -6
View File
@@ -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, "找不到对应信息")