uid != $tokenData['uid']) { CacheService::clearToken($token); throw new AuthException('登录状态有误,请重新登录', 410002); } $tokenData['type'] = $type; return compact('user', 'tokenData'); } }