panlumeng 3 年之前
父節點
當前提交
4ca1c81eec
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/admin/controller/Cat.php

+ 3 - 3
app/admin/controller/Cat.php

@@ -61,14 +61,14 @@ public function title(){
     }
     $pid=isset($this->post['pid']) && $this->post['pid'] !==""? intval($this->post['pid']) :"";
     if($pid!==""){
-        $where[]=['pid',"=",$pid];
+        $where[]=["pid","=",$pid];
     }
     $status=isset($this->post['status']) && $this->post['status'] !==""? intval($this->post['status']) :"";
     if($status!==""){
         $where[]=['status',"=",$status];
     }
-    $list = Db::name('cat')->where(['is_del'=>0])->select();
-    return app_show(0, "获取成功", $list);
+    $list = Db::name('cat')->where([$where])->select();
+    return app_show(0, "获取成功",$list);
 }
 public function create()
 {