|
|
@@ -32,9 +32,22 @@ class BaseController extends PublicController
|
|
|
|
|
|
//token验证
|
|
|
$adminId = jwt::getLoginId();
|
|
|
- if (getenv('YII_ENV', 'local') != 'production') {
|
|
|
- //$adminId = 253;
|
|
|
+
|
|
|
+ //将石少华的号模拟成别人的号进行测试,有多处需要同步修改,关键词 simulate_other ssh 20250717
|
|
|
+ $simulateKey = 'simulate_admin_id';
|
|
|
+ $simulateId = Yii::$app->redis->executeCommand('GET', [$simulateKey]);
|
|
|
+ if (!empty($simulateId) && $simulateId > 0) {
|
|
|
+ if (getenv('YII_ENV') == 'production') {
|
|
|
+ if ($adminId == 4) {
|
|
|
+ $adminId = $simulateId;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if ($adminId == 919) {
|
|
|
+ $adminId = $simulateId;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
if (empty($adminId) && in_array($action->id, $this->guestAccess) == false) {
|
|
|
util::notLogin();
|
|
|
}
|