dever 3 years ago
parent
commit
ad0ce58ab6
1 changed files with 6 additions and 2 deletions
  1. 6 2
      app/shop/lib/Info.php

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

@@ -37,8 +37,12 @@ class Info
 
         # 验证本城市内有没有店
         $type = Dever::input('type', 1);
-        if (!$data && $type == 1) {
-            $data = $this->fetch(false, $city, $lng, $lat, 10, $name, $method);
+        if (!$data) {
+            if ($type == 1) {
+                $data = $this->fetch(false, $city, $lng, $lat, 10, $name, $method);
+            } else {
+                $data = $this->fetch(false, false, $lng, $lat, 10, $name, $method);
+            }
         }
 
         if ($data) {