moonsflyer há 4 meses atrás
pai
commit
2115488b8d
1 ficheiros alterados com 8 adições e 2 exclusões
  1. 8 2
      phalapi/src/app/Model/Home.php

+ 8 - 2
phalapi/src/app/Model/Home.php

@@ -153,9 +153,15 @@ class Home extends NotORM{
     }
     public function getClassidShopLists($type,$province,$name,$p){
 //        $where=['type'=>$type];
-        $where['type'] = $type;
+//        $where['type'] = $type;
+        $where = 'type={$type}';
         if(!empty($province)){
-            $where['province'] = $province;
+//            $where['province'] = $province;
+            $where .= ' and province={$province}';
+        }
+        if(!empty($name)){
+//            $where['province'] = $province;
+            $where .= " and name like '%{$province}%' " ;
         }
         $info=\App\getClassidShopLists($where,$name,$p);
         return $info;