Commit a2c8fe8e authored by ly's avatar ly

错误信息判断

parent d10786c0
...@@ -115,6 +115,12 @@ export default { ...@@ -115,6 +115,12 @@ export default {
} }
}).catch(err => { }).catch(err => {
console.log(err, '请求出错') console.log(err, '请求出错')
uni.showToast({
title: err.message,
icon: "none",
duration: 2000
})
}) })
}, },
// 获取验证码倒计时 // 获取验证码倒计时
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -63,11 +63,14 @@ const request = async (url, type, data) => { ...@@ -63,11 +63,14 @@ const request = async (url, type, data) => {
} }
}, },
fail: (err) => { fail: (err) => {
uni.showToast({ const locationInfo = uni.getStorageSync('m-location-info')
title: err.message ? err.message : '服务器开小差了~', if(locationInfo){
icon: "none", uni.showToast({
duration: 2000 title: err.message ? err.message : '服务器开小差了~',
}) icon: "none",
duration: 2000
})
}
reject(err) reject(err)
} }
}); });
......
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