dever 3 yıl önce
ebeveyn
işleme
d70e333d04
1 değiştirilmiş dosya ile 13 ekleme ve 13 silme
  1. 13 13
      app/card/src/Api.php

+ 13 - 13
app/card/src/Api.php

@@ -13,20 +13,20 @@ class Api extends Core
         $this->checkLogin();
         $this->shop_id = Dever::input('shop_id');
 
-        if (!$this->shop_id) {
-            Dever::alert('请选择门店');
-        }
-
-        $lng = Dever::input('lng');
-        $lat = Dever::input('lat');
-        if ($lng && $lat) {
-            $this->shop = Dever::load('shop/lib/info')->fetch($this->shop_id, false, $lng, $lat, false);
-        } else {
-            $this->shop = Dever::db('shop/info')->getOne($this->shop_id);
-        }
+        $this->shop = array();
+
+        if ($this->shop_id) {
+            $lng = Dever::input('lng');
+            $lat = Dever::input('lat');
+            if ($lng && $lat) {
+                $this->shop = Dever::load('shop/lib/info')->fetch($this->shop_id, false, $lng, $lat, false);
+            } else {
+                $this->shop = Dever::db('shop/info')->getOne($this->shop_id);
+            }
 
-        if (!$this->shop) {
-            Dever::alert('门店不存在');
+            if (!$this->shop) {
+                Dever::alert('门店不存在');
+            }
         }
     }