feat: 登录逻辑调整

This commit is contained in:
duanshuwen
2025-12-27 22:49:14 +08:00
parent ea56695099
commit 56ad450731
10 changed files with 93 additions and 75 deletions

View File

@@ -108,7 +108,7 @@ import WebSocketManager from "@/utils/WebSocketManager";
import { ThrottleUtils, IdUtils } from "@/utils";
import { checkToken } from "@/hooks/useGoLogin";
import { useAppStore } from "@/store";
import { getStorageSyncToken } from "@/constant/token";
import { getAccessToken } from "@/constant/token";
const appStore = useAppStore();
/// 导航栏相关
@@ -296,7 +296,7 @@ onLoad(() => {
// token存在初始化数据
const initHandler = () => {
console.log("initHandler");
const token = getStorageSyncToken();
const token = getAccessToken();
if (!token) return;
loadRecentConversation();
@@ -364,7 +364,7 @@ const initWebSocket = async () => {
}
// 使用配置的WebSocket服务器地址
const token = getStorageSyncToken();
const token = getAccessToken();
const wsUrl = `${appStore.serverConfig.wssUrl}?access_token=${token}`;
// 初始化WebSocket管理器