【代码优化】特殊:处理分销用户绑定失败的提示
parent
c1f2117e48
commit
039f05ce23
|
|
@ -124,9 +124,10 @@ http.interceptors.response.use(
|
||||||
if (response.data.code === 401) {
|
if (response.data.code === 401) {
|
||||||
return refreshToken(response.config);
|
return refreshToken(response.config);
|
||||||
}
|
}
|
||||||
|
// 特殊:处理分销用户绑定失败的提示
|
||||||
// 错误提示
|
if ((response.data.code + '').includes('1011007')) {
|
||||||
if (response.config.custom.showError) {
|
console.error(`分销用户绑定失败,原因:${response.data.msg}`);
|
||||||
|
} else if (response.config.custom.showError) { // 错误提示
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: response.data.msg || '服务器开小差啦,请稍后再试~',
|
title: response.data.msg || '服务器开小差啦,请稍后再试~',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue