moonsflyer 5 luni în urmă
părinte
comite
1433c54a86
2 a modificat fișierele cu 6 adăugiri și 10 ștergeri
  1. 4 8
      phalapi/src/app/Model/Home.php
  2. 2 2
      phalapi/src/app/functions.php

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

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

+ 2 - 2
phalapi/src/app/functions.php

@@ -4418,7 +4418,7 @@ namespace App;
         return $info;
     }
     //获分类店铺格式化处理
-    function getClassidShopLists($where,$name,$p){
+    function getClassidShopLists($where,$p){
 
         $nums = 20;
         if($p<1){
@@ -4430,7 +4430,7 @@ namespace App;
             ->where($where)
             ->limit($start,$nums)
             ->fetchAll();
-        $shop_list = [];
+
         foreach($rs as &$v){
             $v['thumb'] =  get_upload_path( $v['thumb']);
             $v['delivery_time'] =  '35分钟' ;