diff --git a/application.go b/application.go index eb78c4e..6ded1cf 100644 --- a/application.go +++ b/application.go @@ -567,7 +567,15 @@ func Init(config string) *Application { appIns.Router = Router{} } - appIns.Router[codeMake.GetString("name")] = TptProject + //appIns.Router[codeMake.GetString("name")] = TptProject + appIns.Router[codeMake.GetString("name")] = Proj{} + for k2, _ := range TptProject { + appIns.Router[codeMake.GetString("name")][k2] = Ctr{} + for k3, v3 := range TptProject[k2] { + appIns.Router[codeMake.GetString("name")][k2][k3] = v3 + } + } + for k1, _ := range appIns.MakeCodeRouter[codeMake.GetString("name")].TableColumns { appIns.Router[codeMake.GetString("name")][k1] = appIns.Router[codeMake.GetString("name")]["hotimeCommon"] } diff --git a/example/app/init.go b/example/app/init.go index 0f7bbee..628f570 100644 --- a/example/app/init.go +++ b/example/app/init.go @@ -22,7 +22,7 @@ var weixin *wechat.Wechat //微信登录实例 var miniProgram *miniprogram.MiniProgram var h5Program *officialaccount.OfficialAccount -func InitApp(app Application) { +func InitApp(app *Application) { weixin = wechat.NewWechat() memory := cache.NewMemory() memoryMini := cache.NewMemory() diff --git a/example/config/config.json b/example/config/config.json index d07c0ff..94d9a89 100644 --- a/example/config/config.json +++ b/example/config/config.json @@ -18,21 +18,14 @@ "name": "", "rule": "config/adminRule.json", "table": "admin" - }, - { - "config": "config/app.json", - "mode": 0, - "name": "app", - "rule": "config/appRule.json", - "table": "admin" } ], "crossDomain": "", "db": { "mysql": { - "host": "192.168.6.253", - "name": "rfcb", - "password": "dasda8454456", + "host": "192.168.2.50", + "name": "zct_v2", + "password": "kct@2021", "port": "3306", "prefix": "", "user": "root" @@ -51,7 +44,7 @@ }, "imgPath": "img/2006/01/02/", "mode": 2, - "port": "8082", + "port": "8081", "sessionName": "HOTIME", "smsKey": "b0eb4bf0198b9983cffcb85b69fdf4fa", "smsLogin": "【政策通】您的验证码为:{code},请在5分钟内使用,切勿将验证码泄露于他人,如非本人操作请忽略。", diff --git a/example/zct_manage.exe b/example/zct_manage.exe index 217d8b0..5836163 100644 Binary files a/example/zct_manage.exe and b/example/zct_manage.exe differ