|
|
|
@ -171,15 +171,15 @@ service.interceptors.response.use(res => { |
|
|
|
}); |
|
|
|
}else if(res.data.code != 200){ |
|
|
|
//拦截响应,做统一处理
|
|
|
|
if(res.data.code === 500){ |
|
|
|
uni.showToast({ |
|
|
|
title: '网络错误,请稍候重试~', |
|
|
|
icon:"none", |
|
|
|
duration: 2000, |
|
|
|
success() { |
|
|
|
console.log('接口响应错误,'+ res.data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
if(res.config.url.startsWith('/img/img/mini/tiktok/queryGoldNum/')){ |
|
|
|
uni.showToast({ |
|
|
|
title: '网络错误,请稍候重试~', |
|
|
|
icon:"none", |
|
|
|
duration: 2000, |
|
|
|
success() { |
|
|
|
console.log('接口响应错误,'+ res.data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
uni.showToast({ |
|
|
|
title: res.data.msg, |
|
|
|
@ -187,6 +187,22 @@ service.interceptors.response.use(res => { |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} |
|
|
|
// if(res.data.code === 500){
|
|
|
|
// uni.showToast({
|
|
|
|
// title: '网络错误,请稍候重试~',
|
|
|
|
// icon:"none",
|
|
|
|
// duration: 2000,
|
|
|
|
// success() {
|
|
|
|
// console.log('接口响应错误,'+ res.data.msg)
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// }else{
|
|
|
|
// uni.showToast({
|
|
|
|
// title: res.data.msg,
|
|
|
|
// icon:"none",
|
|
|
|
// duration: 2000
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
}else{ |
|
|
|
return res; |
|
|
|
} |
|
|
|
|