diff --git a/app/admin/controller/Menu.php b/app/admin/controller/Menu.php index 5bb0083e1..ee3221377 100644 --- a/app/admin/controller/Menu.php +++ b/app/admin/controller/Menu.php @@ -18,6 +18,7 @@ namespace app\admin\controller; use think\admin\Controller; use think\admin\extend\DataExtend; +use think\admin\helper\QueryHelper; use think\admin\model\SystemMenu; use think\admin\service\AdminService; use think\admin\service\MenuService; @@ -40,9 +41,12 @@ class Menu extends Controller */ public function index() { - $this->title = '系统菜单管理'; $this->type = input('get.type', 'index'); - SystemMenu::mQuery()->order('sort desc,id asc')->layTable();//->page(false, true); + SystemMenu::mQuery()->layTable(function () { + $this->title = '系统菜单管理'; + }, function (QueryHelper $query) { + $query->order('sort desc,id asc'); + }); } /** @@ -68,7 +72,7 @@ class Menu extends Controller if ($vo['url'] !== '#' && !preg_match('/^(https?:)?(\/\/|\\\\)/i', $vo['url'])) { $vo['url'] = trim(url($vo['url']) . ($vo['params'] ? "?{$vo['params']}" : ''), '\\/'); } - $vo['ids'] = join(',', DataExtend::getArrSubIds($data, $vo['id'])); + $vo['ids'] = arr2str(DataExtend::getArrSubIds($data, $vo['id'])); } } diff --git a/app/admin/route/demo.php b/app/admin/route/demo.php index cfc50437f..dff65c75a 100644 --- a/app/admin/route/demo.php +++ b/app/admin/route/demo.php @@ -58,5 +58,4 @@ invoke(function (App $app) { return json(['code' => 0, 'info' => '演示环境禁止修改用户密码!']); }); } - }); \ No newline at end of file diff --git a/app/admin/view/auth/form.html b/app/admin/view/auth/form.html index 81cfbbe6d..f28307c9c 100644 --- a/app/admin/view/auth/form.html +++ b/app/admin/view/auth/form.html @@ -1,4 +1,4 @@ -
+
diff --git a/app/admin/view/auth/index.html b/app/admin/view/auth/index.html index 4f886c05b..47b7924ee 100644 --- a/app/admin/view/auth/index.html +++ b/app/admin/view/auth/index.html @@ -2,18 +2,18 @@ {block name="button"} - + - + {/block} {block name="content"}
{include file='auth/index_search'} -
+
{/block} @@ -21,25 +21,25 @@ - - - diff --git a/app/admin/view/index/theme.html b/app/admin/view/index/theme.html index b6f3c581c..3a1e70156 100644 --- a/app/admin/view/index/theme.html +++ b/app/admin/view/index/theme.html @@ -1,4 +1,4 @@ - +
diff --git a/app/admin/view/main.html b/app/admin/view/main.html index 12d21462f..e79b95bee 100644 --- a/app/admin/view/main.html +++ b/app/admin/view/main.html @@ -3,7 +3,7 @@ {block name='header'} {notempty name='title'}
- {$title|default=''} + {$title|default=''}
{block name='button'}{/block}
{/notempty} diff --git a/app/admin/view/menu/form.html b/app/admin/view/menu/form.html index e20be4c30..3671276a4 100644 --- a/app/admin/view/menu/form.html +++ b/app/admin/view/menu/form.html @@ -1,4 +1,4 @@ - +
diff --git a/app/admin/view/menu/index.html b/app/admin/view/menu/index.html index c7612d53c..463b580f1 100644 --- a/app/admin/view/menu/index.html +++ b/app/admin/view/menu/index.html @@ -6,11 +6,11 @@ - + - + {/block} @@ -66,7 +66,7 @@ var data = {id: obj.value, status: obj.elem.checked > 0 ? 1 : 0}; if (data.status > 0) data.id += obj.elem.dataset.path.replace(/-/g, ','); $.form.load("{:url('state')}", data, 'post', function (ret) { - if (obj.value.indexOf(',') > -1) { + if (obj.value.split(',').length > 2) { $('#MenuData').trigger('reload'); } else if (ret.code < 1) $.msg.error(ret.info, 3, function () { $('#MenuData').trigger('reload'); diff --git a/app/admin/view/oplog/index.html b/app/admin/view/oplog/index.html index 73077ba20..5bb5456db 100644 --- a/app/admin/view/oplog/index.html +++ b/app/admin/view/oplog/index.html @@ -2,24 +2,25 @@ {block name="button"} - + + - + {/block} {block name="content"}
{include file='oplog/index_search'} -
+
{/block} {block name='script'}