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) => {
const locationInfo = uni.getStorageSync('m-location-info')
if(locationInfo){
uni.showToast({ uni.showToast({
title: err.message ? err.message : '服务器开小差了~', title: err.message ? err.message : '服务器开小差了~',
icon: "none", icon: "none",
duration: 2000 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