Commit 98e35778 by 姜雷

Merge branch 'develop' into 'test'

添加接口错误不弹出错误提示功能 See merge request !167
parents e8e1a1b2 0f0efc90
......@@ -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