Commit 98e35778 by 姜雷

Merge branch 'develop' into 'test'

添加接口错误不弹出错误提示功能 See merge request !167
parents e8e1a1b2 0f0efc90
...@@ -40,5 +40,6 @@ export const getFeedbackList = req => ...@@ -40,5 +40,6 @@ export const getFeedbackList = req =>
export const getWarnningCount = req => export const getWarnningCount = req =>
fetch({ fetch({
url: devicePath + '/device/warning/count', url: devicePath + '/device/warning/count',
noErrorAlert: true,
...req, ...req,
}); });
...@@ -33,7 +33,7 @@ export const validateCode = res => { ...@@ -33,7 +33,7 @@ export const validateCode = res => {
}; };
export const errorHandle = error => { export const errorHandle = error => {
console.error('err' + error); // for debug console.table(['fetchError: ', error]); // for debug
store.dispatch('fetchDone'); store.dispatch('fetchDone');
if (error.message && /timeout/.test(error.message)) { if (error.message && /timeout/.test(error.message)) {
Message({ Message({
...@@ -45,7 +45,7 @@ export const errorHandle = error => { ...@@ -45,7 +45,7 @@ export const errorHandle = error => {
} }
if (isCancel(error)) { if (isCancel(error)) {
console.log('取消请求'); console.log('取消请求');
} else { } else if (!error.config.noErrorAlert) {
Message({ Message({
message: error.message, message: error.message,
type: 'error', 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