Compare commits

..

No commits in common. "a82875da05572958f2640744de58cb0eb5f2c0e3" and "7895ff81c8a791c500f55b748db7fb2c67724d4e" have entirely different histories.

2 changed files with 3 additions and 8 deletions

View File

@ -2,7 +2,6 @@ import axios from "axios";
import $router from "../router";
import { message } from "ant-design-vue";
import { Local } from "@/utils/erpStorage.js";
import { getAccessToken } from "@/utils/auth";
const service = axios.create({
baseURL: import.meta.env.VITE_EPR_BASEURL,
timeout: 60 * 60 * 1000,
@ -22,10 +21,6 @@ service.interceptors.request.use(
config.headers["Content-Type"] = "multipart/form-data";
config.headers.Authorization = Local.get("token") || "";
} else config.headers.Authorization = Local.get("token") || "";
if(!config.headers.Authorization && import.meta.env.MODE === 'test'){
// 测试环境直接启动项目时没有token使用auth写死的token
config.headers.Authorization = getAccessToken()
}
return config;
},
(error) => {

View File

@ -27,9 +27,9 @@ export default defineConfig(({ mode }) => {
vueJsx({}),
compressPlugin(),
UnoCSS(),
// vueDevTools({
// launchEditor: 'cursor',
// })
vueDevTools({
launchEditor: 'cursor',
})
],
define: {
__APP_ENV__: env.APP_ENV