添加ai_token

This commit is contained in:
2026-08-31 17:16:37 +08:00
parent bc629e9189
commit a4c7adb317
3 changed files with 4 additions and 0 deletions
+1
View File
@@ -131,6 +131,7 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
async function loginByToken(loginToken: Api.Auth.LoginToken) { async function loginByToken(loginToken: Api.Auth.LoginToken) {
// 1. stored in the localStorage, the later requests need it in headers // 1. stored in the localStorage, the later requests need it in headers
localStg.set('token', loginToken.token); localStg.set('token', loginToken.token);
localStg.set('aiToken', loginToken.ai_token);
// 2. get user info // 2. get user info
const pass = await getUserInfo(); const pass = await getUserInfo();
+1
View File
@@ -6,6 +6,7 @@ declare namespace Api {
*/ */
namespace Auth { namespace Auth {
interface LoginToken { interface LoginToken {
ai_token: string;
token: string; token: string;
refreshToken: string; refreshToken: string;
} }
+2
View File
@@ -14,6 +14,8 @@ declare namespace StorageType {
userInfo: any; userInfo: any;
/** The i18n language */ /** The i18n language */
lang: App.I18n.LangType; lang: App.I18n.LangType;
/** The ai token */
aiToken: string;
/** The token */ /** The token */
token: string; token: string;
/** Fixed sider with mix-menu */ /** Fixed sider with mix-menu */