From ddae4c68f2d5d28a716e8b2fe3dc3d8c7d745d05 Mon Sep 17 00:00:00 2001 From: sugar1569 Date: Thu, 18 Apr 2019 11:51:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=89=E6=8B=A9=E6=9D=83?= =?UTF-8?q?=E9=99=90=E8=8F=9C=E5=8D=95=E5=92=8C=E5=90=8E=E5=8F=B0=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E4=B8=80=E6=A0=B7=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/model/system/SystemMenus.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/admin/model/system/SystemMenus.php b/application/admin/model/system/SystemMenus.php index a23d4101..87827fab 100644 --- a/application/admin/model/system/SystemMenus.php +++ b/application/admin/model/system/SystemMenus.php @@ -123,7 +123,7 @@ class SystemMenus extends ModelBasic // if($params['access'] !== '') $model = $model->where('access',$params['access']);//子管理员是否可用 if($params['pid'] !== ''&& !$params['keyword'] ) $model = $model->where('pid',$params['pid']); if($params['keyword'] !== '') $model = $model->where('menu_name|id|pid','LIKE',"%$params[keyword]%"); - $model = $model->order('sort DESC,id DESC'); + $model = $model->order('sort DESC,id ASC'); return self::page($model,$params); } @@ -144,7 +144,9 @@ class SystemMenus extends ModelBasic return self::where('action',$action) ->where('controller',lcfirst($controller)) ->where('module',lcfirst($module)) - ->where('params',['=',$params],['=','[]'],'or')->order('id DESC')->value('menu_name'); + ->where('params',['=',$params],['=','[]'],'or') + ->order('id DESC') + ->value('menu_name'); } } \ No newline at end of file