添加ai请求地址

This commit is contained in:
2026-09-01 11:03:27 +08:00
parent a4c7adb317
commit 3d6525e3d4
7 changed files with 287 additions and 11 deletions
+8
View File
@@ -3,12 +3,20 @@ import { localStg } from '@/utils/storage';
import { fetchRefreshToken } from '../api';
import type { RequestInstanceState } from './type';
// 获取token
export function getAuthorization() {
const token = localStg.get('token');
const Authorization = token ? `Bearer ${token}` : null;
return Authorization;
}
// 获取ai token
export function getAiAuthorization() {
const token = localStg.get('aiToken');
const Authorization = token ? `Bearer ${token}` : null;
return Authorization;
}
/** refresh token */
async function handleRefreshToken() {