panlumeng 3 years ago
parent
commit
951e666fbd
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/admin/controller/Brand.php

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

@@ -57,7 +57,7 @@ class Brand extends BaseController
         $size = isset($this->post['size']) && $this->post['size'] !=="" ? intval($this->post['size']):"10";
         $where=[["is_del","=",0]];
         $brand_name = isset($this->post['brand_name']) && $this->post['brand_name'] !=="" ? trim($this->post['brand_name']):"";
-        if($brand_name!=""){
+        if($brand_name!==""){
             $where[]=['brand_name',"like","%$brand_name%"];
         }
         $status = isset($this->post['status']) && $this->post['status'] !=="" ? intval($this->post['status'])
@@ -65,8 +65,8 @@ class Brand extends BaseController
         if($status!==""){
             $where[]=['status',"=",$status];
         }
-        $creater = isset($this->post['creater']) && $this->post['creater'] !=="" ? intval($this->post['creater']):"";
-        if($creater!=""){
+        $creater = isset($this->post['creater']) && $this->post['creater'] !=="" ? trim($this->post['creater']):"";
+        if($creater!==""){
             $where[]=['creater',"like","%$creater%"];
         }
         $start = isset($this->post['start']) && $this->post['start']!=="" ? $this->post['start']:"";