This commit is contained in:
Teo
2025-09-10 01:11:46 +08:00
parent f006ca5a2b
commit 311623e208
54 changed files with 3724 additions and 1523 deletions

View File

@ -70,9 +70,11 @@ const exceptionStr = '/api/v1/test/'; // /api/v1/test/*接口拦截
service.interceptors.request.use(
(config: any) => {
// 在发送请求之前做些什么 token
if (token) {
config.headers = config.headers || {};
(config.headers as any)['Authorization'] = `Bearer ${token}`;
console.log('🚀 ~ config.headers:', config.headers);
}
const stores = useUserStore();
if (!whiteUrl.includes(config.url) && !config.url.includes(exceptionStr)) {