From 4abf8abe985a2def2c85450f0c9b69b3c6be4439 Mon Sep 17 00:00:00 2001 From: Karson Date: Tue, 25 Apr 2017 11:05:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=87=AA=E5=8A=A8=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=5F=5FCDN=5F=5F=E5=92=8Ccdnurl=E7=9A=84=E5=80=BC=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E4=BA=8C=E7=BA=A7=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E4=B8=8B=E5=92=8C=E9=9D=9E=E4=BC=AA=E9=9D=99=E6=80=81=E4=B8=8B?= =?UTF-8?q?=E7=9A=84=E8=84=9A=E6=9C=AC=E5=8A=A0=E8=BD=BD=E9=94=99=E8=AF=AF?= =?UTF-8?q?=20=E7=A7=BB=E9=99=A4subdomain=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/library/Auth.php | 5 +++-- application/admin/view/common/header.html | 6 +++--- application/admin/view/common/menu.html | 2 +- application/admin/view/index/login.html | 2 +- application/common/behavior/Common.php | 25 ++++++++++++++++++++++ application/common/controller/Backend.php | 9 +++++--- application/common/controller/Frontend.php | 3 +-- application/index/view/index/index.html | 8 +++---- application/tags.php | 6 ++++-- public/assets/css/backend-func.css | 2 ++ public/assets/css/backend.min.css | 2 +- public/assets/js/backend.js | 2 +- public/assets/js/backend/index.js | 6 +++++- public/assets/js/backend/wechat/menu.js | 1 - public/assets/js/frontend.js | 2 +- public/assets/js/frontend/demo.js | 2 +- public/assets/js/require-backend.js | 5 +++-- public/assets/js/require-backend.min.js | 9 ++++---- public/assets/js/require-frontend.js | 4 +++- public/assets/js/require-frontend.min.js | 6 ++++-- public/assets/less/backend-func.less | 8 +++++-- 21 files changed, 80 insertions(+), 35 deletions(-) create mode 100644 application/common/behavior/Common.php diff --git a/application/admin/library/Auth.php b/application/admin/library/Auth.php index e8126925..23f3940b 100644 --- a/application/admin/library/Auth.php +++ b/application/admin/library/Auth.php @@ -214,12 +214,13 @@ class Auth extends \fast\Auth $colorArr = ['red', 'green', 'yellow', 'blue', 'teal', 'orange', 'purple']; $colorNums = count($colorArr); $badgeList = []; + $module = request()->module(); // 生成菜单的badge foreach ($params as $k => $v) { if (stripos($k, '/') === false) { - $url = '/admin/' . $k; + $url = '/' . $module . '/' . $k; } else { @@ -249,7 +250,7 @@ class Auth extends \fast\Auth $userRule = $this->getRuleList(); $select_id = 0; - $dashboard = rtrim(url('dashboard/'), '/'); + $dashboard = '/' . $module . '/dashboard'; // 必须将结果集转换为数组 $ruleList = collection(model('AuthRule')->where('ismenu', 1)->order('weigh', 'desc')->cache("__menu__")->select())->toArray(); foreach ($ruleList as $k => &$v) diff --git a/application/admin/view/common/header.html b/application/admin/view/common/header.html index c0ed16be..839fdcc3 100644 --- a/application/admin/view/common/header.html +++ b/application/admin/view/common/header.html @@ -61,13 +61,13 @@