update
This commit is contained in:
@@ -2,6 +2,12 @@ import axios from 'axios';
|
||||
import AESCrypto from "./AESCrypto.js";
|
||||
import {Message} from '@arco-design/web-vue';
|
||||
import {useUserStore} from "../pinia/UserStore/index.js";
|
||||
import {useSystemStore} from "../pinia/SystemStore/index.js";
|
||||
|
||||
const excludeURL = [
|
||||
'/admin/admin/menu',
|
||||
'/index/business/getMenu',
|
||||
];
|
||||
|
||||
export const BASEURL = import.meta.env.MODE === 'development' ? '/baseApi' : import.meta.env.VITE_API_URL;
|
||||
|
||||
@@ -47,6 +53,13 @@ request.interceptors.response.use((response) => {
|
||||
Message.error(msg);
|
||||
return Promise.reject(msg);
|
||||
}
|
||||
|
||||
const {updateRouterTag} = useSystemStore();
|
||||
|
||||
if (!excludeURL.includes(response.config.url)) {
|
||||
updateRouterTag();
|
||||
}
|
||||
|
||||
if (!data.data) {
|
||||
return {msg, code, data}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user