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 @@ -