dever 3 سال پیش
والد
کامیت
fb1a656ce1
1فایلهای تغییر یافته به همراه9 افزوده شده و 6 حذف شده
  1. 9 6
      app/shop/lib/Info.php

+ 9 - 6
app/shop/lib/Info.php

@@ -186,7 +186,7 @@ class Info
             if ($county) {
                 $city = $county['city_id'];
             }
-            if ($type == 1 && $city) {
+            if ($type < 10 && $city) {
                 $where .= ' and city = ' . $city;
             }
         }
@@ -198,12 +198,15 @@ class Info
             $where .= ' and id = ' . $id;
         }
 
-        $shop_method = Dever::input('method');
-        if ($shop_method == 1) {
-            $where .= ' and method in(1,3)';
-        } elseif ($shop_method == 2) {
-            $where .= ' and method in(2,3)';
+        if ($type < 10) {
+            $shop_method = Dever::input('method');
+            if ($shop_method == 1) {
+                $where .= ' and method in(1,3)';
+            } elseif ($shop_method == 2) {
+                $where .= ' and method in(2,3)';
+            }
         }
+        
         if ($lng && $lat) {
             $sql = 'select id,name,`desc`,truename,mobile,lng,lat,address,open,worktime,method,gotime,city,area,province,county,town,coupon_city,pdesc,license,food_license,jy_license,license_number,company_name,round((st_distance(point(lng, lat), point('.$lng.', '.$lat.'))*111195)/1000, 2) as distance from {table} where '.$where.' order by distance asc';