添加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) {
// 1. stored in the localStorage, the later requests need it in headers
localStg.set('token', loginToken.token);
localStg.set('aiToken', loginToken.ai_token);
// 2. get user info
const pass = await getUserInfo();
+1
View File
@@ -6,6 +6,7 @@ declare namespace Api {
*/
namespace Auth {
interface LoginToken {
ai_token: string;
token: string;
refreshToken: string;
}
+2
View File
@@ -14,6 +14,8 @@ declare namespace StorageType {
userInfo: any;
/** The i18n language */
lang: App.I18n.LangType;
/** The ai token */
aiToken: string;
/** The token */
token: string;
/** Fixed sider with mix-menu */