框架优化

This commit is contained in:
hoteas
2022-03-14 16:48:19 +08:00
parent cb04dc6c34
commit ce515d991a
6 changed files with 391 additions and 28 deletions
+13 -8
View File
@@ -2,6 +2,8 @@ package main
import (
. "code.hoteas.com/golang/hotime"
"code.hoteas.com/golang/hotime/example/app"
//. "code.hoteas.com/golang/hotime/common"
"fmt"
"time"
@@ -15,17 +17,20 @@ func main() {
//a:=Map{}
//a.GetBool()
appIns.SetConnectListener(func(that *Context) (isFinished bool) {
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, "开始测试")
// return true
// }
//}
return isFinished
})
//appIns.Db.Action(func(db db.HoTimeDB) (isSuccess bool) {
// return isSuccess
//})
appIns.Run(Router{})
appIns.Run(Router{
"app": app.Project,
})
}