|
@@ -70,15 +70,17 @@ class Category extends BaseModel
|
|
|
* @throws \think\db\exception\DbException
|
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
|
*/
|
|
|
- public function getArMenu($cate_name = '',$pid = '',$show = 0){
|
|
|
+ public function getArMenu($cate_name = '',$pid = '',$is_show = 0){
|
|
|
$menus = $this
|
|
|
- ->where('is_show', 1)
|
|
|
->when(!empty($cate_name),function ($query) use($cate_name){
|
|
|
$query->whereLike('cate_name',"%{$cate_name}%");
|
|
|
})
|
|
|
->when(!empty($pid),function ($query) use($pid){
|
|
|
$query->where('pid',$pid);
|
|
|
})
|
|
|
+ ->when(!empty($is_show),function ($query) use($is_show){
|
|
|
+ $query->where('is_show',$is_show);
|
|
|
+ })
|
|
|
->order("sort","desc")
|
|
|
->select();
|
|
|
$data = [];
|