feat: 登录逻辑调整
This commit is contained in:
@@ -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管理器
|
||||
|
||||
Reference in New Issue
Block a user