From 69e8b7139c72b86f42aa425aac53344dccae3255 Mon Sep 17 00:00:00 2001 From: zhaoxiang <756958008@qq.com> Date: Sun, 20 Nov 2016 16:51:59 +0800 Subject: [PATCH] =?UTF-8?q?modified=20=E4=BF=AE=E5=A4=8D=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=94=BE=E5=A4=A7=E5=B8=A6=E6=9D=A5=E7=9A=84URL=E6=BC=8F?= =?UTF-8?q?=E6=B4=9E=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Base.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/application/admin/controller/Base.php b/application/admin/controller/Base.php index 12370aa..8af6043 100644 --- a/application/admin/controller/Base.php +++ b/application/admin/controller/Base.php @@ -51,8 +51,8 @@ class Base extends Controller { * @return mixed */ protected function _prepareTemplate( $temp ){ + $MenuInfo = Menu::where([])->column('hide','url'); if( !isAdministrator() ){ - $MenuInfo = Menu::where([])->column('hide','url'); $authList = (new \Permission())->getAuthList($this->uid); switch ( $temp['tempType'] ){ case 'table': @@ -84,6 +84,21 @@ class Base extends Controller { case 'form': break; } + }else{ + switch ( $temp['tempType'] ){ + case 'table': + foreach ( $temp['topButton'] as $key => $value ){ + $temp['topButton'][$key]['href'] = url($value['href']); + } + $temp['topButton'] = array_values($temp['topButton']); + foreach ( $temp['rightButton'] as $k => $v ){ + $temp['rightButton'][$k]['href'] = url($v['href']); + } + $temp['rightButton'] = array_values($temp['rightButton']); + break; + case 'form': + break; + } } return $temp; }