|
|
@@ -189,6 +189,16 @@ class UserController extends BaseController
|
|
|
util::fail('账号无效');
|
|
|
}
|
|
|
$userId = $user->id ?? 0;
|
|
|
+
|
|
|
+ $mallUpgrading = getenv('MALL_UPGRADING') == false ? 0 : getenv('MALL_UPGRADING');
|
|
|
+ if ($mallUpgrading == 1) {
|
|
|
+ $allowShopAdminIdsStr = getenv('MALL_UPGRADE_ALLOW_USER_IDS') ?: '';
|
|
|
+ $allowShopAdminIds = !empty($allowShopAdminIdsStr) ? explode(',', $allowShopAdminIdsStr) : [];
|
|
|
+ if (!in_array($userId, $allowShopAdminIds)) {
|
|
|
+ util::fail('系统升级中,稍后再试');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$token = !empty($userId) ? jwt::getNewToken($userId) : '';
|
|
|
|
|
|
// 将 $user 转换为数组,然后添加 hasMap 属性(字典中的 hasMap)
|
|
|
@@ -392,4 +402,4 @@ class UserController extends BaseController
|
|
|
$list = UserIntegralClass::getIntegralList($where);
|
|
|
util::success($list);
|
|
|
}
|
|
|
-}
|
|
|
+}
|