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