Compare commits
	
		
			No commits in common. "c9794c3f2592c18419610d55071f382e99cd0d63" and "067312cd5c8446bbd9b37ae7e71ccd393a9a76af" have entirely different histories.
		
	
	
		
			c9794c3f25
			...
			067312cd5c
		
	
		
| @ -2,7 +2,6 @@ import axios from "axios"; | |||||||
| import $router from "../router"; | import $router from "../router"; | ||||||
| import { message } from "ant-design-vue"; | import { message } from "ant-design-vue"; | ||||||
| import { Local } from "@/utils/erpStorage.js"; | import { Local } from "@/utils/erpStorage.js"; | ||||||
| import { getAccessToken } from "@/utils/auth"; |  | ||||||
| const service = axios.create({ | const service = axios.create({ | ||||||
|   baseURL: import.meta.env.VITE_EPR_BASEURL, |   baseURL: import.meta.env.VITE_EPR_BASEURL, | ||||||
|   timeout: 60 * 60 * 1000, |   timeout: 60 * 60 * 1000, | ||||||
| @ -22,10 +21,6 @@ service.interceptors.request.use( | |||||||
|       config.headers["Content-Type"] = "multipart/form-data"; |       config.headers["Content-Type"] = "multipart/form-data"; | ||||||
|       config.headers.Authorization = Local.get("token") || ""; |       config.headers.Authorization = Local.get("token") || ""; | ||||||
|     } else 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; |     return config; | ||||||
|   }, |   }, | ||||||
|   (error) => { |   (error) => { | ||||||
|  | |||||||
| @ -27,9 +27,9 @@ export default defineConfig(({ mode }) => { | |||||||
|       vueJsx({}),  |       vueJsx({}),  | ||||||
|       compressPlugin(),  |       compressPlugin(),  | ||||||
|       UnoCSS(), |       UnoCSS(), | ||||||
|       // vueDevTools({
 |       vueDevTools({ | ||||||
|       //   launchEditor: 'cursor',
 |         launchEditor: 'cursor', | ||||||
|       // })
 |       }) | ||||||
|     ], |     ], | ||||||
|     define: { |     define: { | ||||||
|       __APP_ENV__: env.APP_ENV |       __APP_ENV__: env.APP_ENV | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user