shish il y a 3 ans
Parent
commit
e5b1642547
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      app-hd/controllers/AuthController.php

+ 3 - 1
app-hd/controllers/AuthController.php

@@ -68,6 +68,9 @@ class AuthController extends PublicController
         if (empty($admin)) {
             util::fail('请先注册');
         }
+        $adminId = $admin['id'];
+        AdminClass::updateById($adminId, ['miniOpenId' => $miniOpenId]);
+        $admin['miniOpenId'] = $miniOpenId;
         $openShop = $admin['openShop'] ?? 1;
         $currentShopId = $admin['currentShopId'] ?? 0;
         if (empty($currentShopId)) {
@@ -83,7 +86,6 @@ class AuthController extends PublicController
         $pfShopId = $currentShop->pfShopId ?? 0;
         $onlyCg = $currentShop->onlyCg ?? 1;
         $mainId = $currentShop->mainId ?? 0;
-        $adminId = $admin['id'];
         $shopAdmin = ShopAdminService::getByCondition(['adminId' => $adminId, 'mainId' => $mainId], true);
         if (empty($shopAdmin)) {
             util::fail('没有权限操作');