处理无响应请求

This commit is contained in:
2025-05-14 09:57:14 +08:00
parent a3c4e78c22
commit d27fa31ac7
2 changed files with 25 additions and 3 deletions

View File

@@ -80,7 +80,11 @@ const request = async function (options, config = {}) {
const parseResponse = function (response, url) {
console.log('response', response)
if (!response) {
alertError("服务无响应")
wx.redirectTo({
url: '/pages/login/index',
})
wx.clearStorageSync()
alertError("无响应,请重试")
return
}