Ver código fonte

登录优化

shish 1 ano atrás
pai
commit
8d29bf8023
1 arquivos alterados com 14 adições e 0 exclusões
  1. 14 0
      app-hd/controllers/AuthController.php

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

@@ -561,6 +561,20 @@ class AuthController extends PublicController
             util::success(['token' => '', 'currentMiniOpenId' => $openid]);
         }
         $adminId = $admin['id'];
+
+        //切换账号,多个地方要同步修改,关键词 change_account
+        if (getenv('YII_ENV') == 'production') {
+            if ($adminId == 4) {
+                $adminId = 16020;
+                $admin = AdminClass::getById($adminId);
+            }
+        } else {
+            if ($adminId == 919) {
+                $adminId = 1109;
+                $admin = AdminClass::getById($adminId);
+            }
+        }
+
         $currentShopId = $admin['currentShopId'] ?? 0;
         if (empty($currentShopId)) {
             //没有管理店铺不允许登录