框架优化
This commit is contained in:
+16
-8
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user