shish 4 лет назад
Родитель
Сommit
c49b47420d
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      app-hd/controllers/AuthController.php

+ 7 - 0
app-hd/controllers/AuthController.php

@@ -148,6 +148,7 @@ class AuthController extends PublicController
             util::fail('没有找到门店');
         }
         $mainId = $currentShop->mainId ?? 0;
+        $pfShopId = $currentShop->pfShopId ?? 0;
         $adminId = $admin['id'];
         $shopAdmin = ShopAdminService::getByCondition(['mainId' => $mainId, 'adminId' => $adminId], true);
         if (empty($shopAdmin)) {
@@ -190,6 +191,7 @@ class AuthController extends PublicController
             'shopId' => $currentShopId,
             'shopAdminId' => $shopAdminId,
             'switchShop' => $switchShop,
+            'pfShopId' => $pfShopId,
             'imgUploadApi' => $imgUploadApi,
             'showDemo' => $showDemo,
             //有小程序新版本提示更新
@@ -239,6 +241,8 @@ class AuthController extends PublicController
             }
             util::fail('请先注册');
         }
+        $currentShop = ShopClass::getById($currentShopId, true);
+        $pfShopId = $currentShop->pfShopId ?? 0;
         $adminId = $admin['id'];
         $shopAdmin = ShopAdminService::getByCondition(['adminId' => $adminId, 'shopId' => $currentShopId, 'delStatus' => 0], true);
         if (empty($shopAdmin)) {
@@ -277,6 +281,7 @@ class AuthController extends PublicController
             'admin' => $admin,
             'shopId' => $currentShopId,
             'shopAdminId' => $shopAdminId,
+            'pfShopId' => $pfShopId,
             'switchShop' => $switchShop,
             'showDemo' => $showDemo,
             'imgUploadApi' => $imgUploadApi,
@@ -471,6 +476,7 @@ class AuthController extends PublicController
             util::success(['token' => '', 'currentMiniOpenId' => $openid]);
         }
         $mainId = $currentShop->mainId ?? 0;
+        $pfShopId = $currentShop->pfShopId ?? 0;
         $shopAdmin = ShopAdminClass::getByCondition(['mainId' => $mainId, 'adminId' => $adminId], true);
         if (empty($shopAdmin)) {
             //没有管理店铺不允许登录
@@ -507,6 +513,7 @@ class AuthController extends PublicController
             'shopId' => $currentShopId,
             'shopAdminId' => $shopAdminId,
             'switchShop' => $switchShop,
+            'pfShopId' => $pfShopId,
             'showDemo' => $showDemo,
             'imgUploadApi' => $imgUploadApi,
             //有小程序新版本提示更新