Commit 0f0efc90 by 姜雷

添加接口错误不弹出错误提示功能

parent 2ac889b6
......@@ -40,5 +40,6 @@ export const getFeedbackList = req =>
export const getWarnningCount = req =>
fetch({
url: devicePath + '/device/warning/count',
noErrorAlert: true,
...req,
});
......@@ -33,7 +33,7 @@ export const validateCode = res => {
};
export const errorHandle = error => {
console.error('err' + error); // for debug
console.table(['fetchError: ', error]); // for debug
store.dispatch('fetchDone');
if (error.message && /timeout/.test(error.message)) {
Message({
......@@ -45,7 +45,7 @@ export const errorHandle = error => {
}
if (isCancel(error)) {
console.log('取消请求');
} else {
} else if (!error.config.noErrorAlert) {
Message({
message: error.message,
type: 'error',
......
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