This commit is contained in:
yuping
2022-12-14 19:31:46 +08:00
parent ffafa08e32
commit 60d6ffd55d
8 changed files with 16 additions and 9 deletions

View File

@@ -89,7 +89,7 @@ export async function request(_url, params) {
'X-Token': localStorage.getItem('token'),
...method !== 'get' ? {'Content-Type': 'application/json'} : {}
},
baseURL: BASE,
baseURL: import.meta.env.VITE_BASE_API,
...method !== 'get' ? {data: JSON.stringify(body)} : {}
}).then(resp => resp.data).then(response => {
if (response.code !== 200 && response.code !== 0) {