基础整理

This commit is contained in:
hoteas
2022-05-03 09:41:18 +08:00
parent 0b09a13c17
commit 58da542533
7 changed files with 430 additions and 8 deletions
+5 -7
View File
@@ -6,6 +6,11 @@ import (
)
var UserCtr = Ctr{
"test": func(that *Context) {
that.Session("user_id", 1)
that.Session("wechat_id", 1)
that.Display(0, 1)
},
//用户微信公众号或者小程序登录
"info": func(that *Context) {
if that.Session("user_id").Data != nil {
@@ -34,13 +39,6 @@ var UserCtr = Ctr{
that.Display(0, user)
},
"auth": func(that *Context) {
if that.Session("user_id").Data != nil {
that.Display(2, "没有登录")
return
}
},
"edit": func(that *Context) {
if that.Session("user_id").Data != nil {
that.Display(2, "没有登录")