hookehuyr

fix: 添加图片上传失败的错误处理

在注册、编辑资料、车辆认证和出售页面中,为图片上传功能添加失败时的错误提示处理,显示错误信息并隐藏加载状态
......@@ -296,6 +296,17 @@ const uploadImage = (filePath) => {
}
},
});
},
fail: function (res) {
Taro.hideLoading({
success: () => {
Taro.showToast({
icon: 'error',
title: '上传失败,稍后重试!',
mask: true
})
}
})
}
});
}
......
......@@ -274,6 +274,17 @@ const uploadImage = (filePath) => {
}
},
});
},
fail: function (res) {
Taro.hideLoading({
success: () => {
Taro.showToast({
icon: 'error',
title: '上传失败,稍后重试!',
mask: true
})
}
})
}
});
}
......
......@@ -505,8 +505,19 @@ const uploadImage = (filePath, type) => {
mask: true
})
}
},
}
});
},
fail: function (res) {
Taro.hideLoading({
success: () => {
Taro.showToast({
icon: 'error',
title: '上传失败,稍后重试!',
mask: true
})
}
})
}
});
}
......
......@@ -287,6 +287,17 @@ const uploadImage = (filePath, type) => {
}
},
});
},
fail: function (res) {
Taro.hideLoading({
success: () => {
Taro.showToast({
icon: 'error',
title: '上传失败,稍后重试!',
mask: true
})
}
})
}
});
}
......