Commit 72d05b9b authored by nick zheng's avatar nick zheng

fix: 请求接口区分环境

parent 3562c8d1
......@@ -16,8 +16,6 @@ export interface Response<T> {
pagingInfo?: PagingInfoParams & { totalPages: number; totalRows: number }
}
const ENV = import.meta.env.VITE_APP_ENV
function handleLogout() {
const currentRoute = router.currentRoute.value
......@@ -26,7 +24,7 @@ function handleLogout() {
}
const service = axios.create({
baseURL: `${BASE_URLS[ENV]}/api/rest`,
baseURL: `${BASE_URLS[window.ENV || 'DEV']}/api/rest`,
timeout: 7000,
headers: {
'Content-Type': 'application/json',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment