This commit is contained in:
oneao committed 2025-11-18 22:35:18 +08:00
1 parent 1445ed3b6c
commit 7419021927
19 files changed
+474 -327

No files matched your search

@@ -30,8 +30,8 @@ function isWhiteListed(url: string) {
}
const alovaInstance = createAlova({
// baseURL: 'http://192.168.5.6:8085/app',
baseURL: 'http://192.168.1.136:8085/app',
baseURL: 'http://192.168.5.6:8085/app',
// baseURL: 'http://192.168.1.136:8085/app',
requestAdapter: axiosRequestAdapter(),
timeout: 5000,
cacheFor: null,
@@ -76,9 +76,9 @@ const alovaInstance = createAlova({
// 重试原请求
method.config.headers.token = newToken
const retryResult = await method.send() // ✅ 获取结果
const retryResult = await method.send()
return retryResult // ✅ 一定要 return!
return retryResult
}
catch (err) {
return Promise.reject(err)
@@ -88,7 +88,6 @@ const alovaInstance = createAlova({
return result
},
onError: (error: AxiosError, _method) => {
console.log('===跳转到error了===')
console.log(error.status)
switch (error.status) {