dever vor 3 Jahren
Ursprung
Commit
12ea5c099a
1 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
  1. 5 5
      app/shop/lib/Info.php

+ 5 - 5
app/shop/lib/Info.php

@@ -41,7 +41,7 @@ class Info
             if ($type == 1) {
                 # 获取平台店
                 $data = $this->fetch(false, $city, $lng, $lat, 10, $name, $method);
-                if ($data) {
+                if ($data && $method == 'fetch') {
                     # 提示是否进入平台
                     $data['alert'] = 2;
                 }
@@ -49,7 +49,7 @@ class Info
             } elseif ($type == 2) {
                 # 获取城市外的其他店
                 $data = $this->fetch(false, false, $lng, $lat, 1, $name, $method);
-                if ($data) {
+                if ($data && $method == 'fetch') {
                     # 提示是否进入所有最近店铺
                     $data['alert'] = 4;
                 }
@@ -60,16 +60,16 @@ class Info
                 if (!$data) {
                     # 获取平台店
                     $data = $this->fetch(false, $city, $lng, $lat, 10, $name, $method);
-                    if ($data) {
+                    if ($data && $method == 'fetch') {
                         # 提示是否进入平台
                         $data['alert'] = 2;
                     }
-                } else {
+                } elseif ($method == 'fetch') {
                     # 提示是否进入城市内最近店铺
                     $data['alert'] = 3;
                 }
             }
-        } else {
+        } elseif ($method == 'fetch') {
             # 是否提示 1不提示
             $data['alert'] = 1;
         }