Przeglądaj źródła

判断有没有店

shish 3 miesięcy temu
rodzic
commit
70435dfc10
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      app-hd/controllers/ShopController.php

+ 3 - 0
app-hd/controllers/ShopController.php

@@ -120,6 +120,9 @@ class ShopController extends BaseController
     {
         $get = Yii::$app->request->get();
         $mobile = $get['mobile'] ?? '';
+        if(empty($mobile)){
+            util::success(['has' => 0]);
+        }
         $shop = ShopClass::getByCondition(['mobile' => $mobile], true);
         if (!empty($shop)) {
             util::success(['has' => 1]);