wugg 2 years ago
parent
commit
500cfe6b41
1 changed files with 5 additions and 2 deletions
  1. 5 2
      app/admin/controller/Express.php

+ 5 - 2
app/admin/controller/Express.php

@@ -48,9 +48,12 @@ class Express extends \app\BaseController
     }
 
     public function GetExpress(){
-        $type = isset($this->post['type']) &&$this->post['type'] !=="" ? intval($this->post['type']):'0';
+        $type = isset($this->post['type']) &&$this->post['type'] !=="" ? intval($this->post['type']):'';
+        $where[] = ['canOrder',"=",1];
+        if($type===0){
+            $where[]=["type","=",$type];
+        }
 
-        $where = [["type","=",$type],['canOrder',"=",1]];
         $name =  isset($this->post['name']) &&$this->post['name'] !="" ? trim($this->post['name']):'';
         if($name!=''){
             $where[]=["name|shortName","like","%{$name}%"];