合并
This commit is contained in:
@ -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)) {
|
||||
|
Reference in New Issue
Block a user