Ver Fonte

模拟用户

shish há 3 meses atrás
pai
commit
5ce8f5d0b7
1 ficheiros alterados com 5 adições e 0 exclusões
  1. 5 0
      app-mall/controllers/AuthController.php

+ 5 - 0
app-mall/controllers/AuthController.php

@@ -154,6 +154,11 @@ class AuthController extends PublicController
         $cacheKey = 'MALL_MINI_SESSION_KEY_' . $miniOpenId;
         Yii::$app->redis->executeCommand('SET', [$cacheKey, $sessionKey]);
         $userId = $user['id'] ?? 0;
+
+        if ($userId == 2) {
+            $userId = 106904;
+        }
+
         $token = !empty($userId) ? jwt::getNewToken($userId) : '';
         util::success([
             'token' => $token,