From cac15ade74c13eb34044f319531470932d76de8f Mon Sep 17 00:00:00 2001 From: hoteas <等> Date: Thu, 28 Apr 2022 14:44:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=99=AE=E9=80=9A=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=B1=BB=E5=9E=8B=EF=BC=8C=E4=BB=A5=E5=8F=8A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AF=8C=E6=96=87=E6=9C=AC=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application.go | 10 +++++++++- example/app/init.go | 2 +- example/config/config.json | 15 ++++----------- 3 files changed, 14 insertions(+), 13 deletions(-) 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分钟内使用,切勿将验证码泄露于他人,如非本人操作请忽略。",