From 94e7615dec12eccaf15f48960622b255639049f0 Mon Sep 17 00:00:00 2001 From: Karson <karsonzhang@163.com> Date: Tue, 18 Apr 2017 08:45:59 +0800 Subject: [PATCH] --- application/admin/library/Auth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/admin/library/Auth.php b/application/admin/library/Auth.php index e812692..9885e1c 100644 --- a/application/admin/library/Auth.php +++ b/application/admin/library/Auth.php @@ -219,7 +219,7 @@ class Auth extends \fast\Auth { if (stripos($k, '/') === false) { - $url = '/admin/' . $k; + $url = '/' . $this->request->module() . '/' . $k; } else { @@ -250,6 +250,7 @@ class Auth extends \fast\Auth $select_id = 0; $dashboard = rtrim(url('dashboard/'), '/'); + $dashboard = stripos($dashboard, 'index.php') !== FALSE ? substr($dashboard, stripos($dashboard, 'index.php') + 9) : $dashboard; // 必须将结果集转换为数组 $ruleList = collection(model('AuthRule')->where('ismenu', 1)->order('weigh', 'desc')->cache("__menu__")->select())->toArray(); foreach ($ruleList as $k => &$v) -- libgit2 0.24.0