框架优化

This commit is contained in:
hoteas
2022-03-16 09:58:24 +08:00
parent ce515d991a
commit 5945ed64c6
6 changed files with 262 additions and 163 deletions
+16 -8
View File
@@ -17,14 +17,22 @@ func main() {
//a:=Map{}
//a.GetBool()
appIns.SetConnectListener(func(that *Context) (isFinished bool) {
that.Session("admin_id", 1)
//if len(that.RouterString) == 3 {
// if that.HandlerStr == "/app/hotime/test" {
// that.Session("admin_id", 1)
// that.Display(0, "开始测试")
// return true
// }
//}
//that.Session("admin_id", 1)
if len(that.RouterString) == 3 {
if that.HandlerStr == "/app/hotime/test" {
that.Session("admin_id", 1)
that.Display(0, that.SessionId)
return true
}
if that.RouterString[1] == "wechat" || that.RouterString[1] == "websocket" {
if appIns.MethodRouter[that.HandlerStr] != nil {
appIns.MethodRouter[that.HandlerStr](that)
return true
}
}
}
return isFinished
})
//appIns.Db.Action(func(db db.HoTimeDB) (isSuccess bool) {