| | |
| | | return res.data ? res.data : {}; |
| | | } else { |
| | | if(!res.config.loadingFlag){ |
| | | // Message({ |
| | | // // message: res.data.msg==res.data.data?res.data.data:res.data.msg+','+res.data.data, |
| | | // message: res.data.msg, |
| | | // type: 'error', |
| | | // duration: 5 * 1000 |
| | | // }) |
| | | MessageBox.confirm( res.data.msg+"?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | Message({ |
| | | // message: res.data.msg==res.data.data?res.data.data:res.data.msg+','+res.data.data, |
| | | message: res.data.msg, |
| | | type: 'error', |
| | | duration: 5 * 1000 |
| | | }) |
| | | .then(() => { |
| | | }) |
| | | .catch(() => {}); |
| | | // MessageBox.confirm( res.data.msg+"?", "提示", { |
| | | // confirmButtonText: "确定", |
| | | // cancelButtonText: "取消", |
| | | // type: "warning", |
| | | // }) |
| | | // .then(() => { |
| | | // }) |
| | | // .catch(() => {}); |
| | | } |
| | | return res.data ? res.data : {}; |
| | | } |
| | |
| | | } else if (message.includes('Request failed with status code')) { |
| | | message = '系统接口' + message.substr(message.length - 3) + '异常' |
| | | } |
| | | // Message({ |
| | | // message: message, |
| | | // type: 'error', |
| | | // duration: 5 * 1000 |
| | | // }) |
| | | MessageBox.confirm( message+"?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | Message({ |
| | | message: message, |
| | | type: 'error', |
| | | duration: 5 * 1000 |
| | | }) |
| | | .then(() => {}) |
| | | .catch(() => {}); |
| | | // MessageBox.confirm( message+"?", "提示", { |
| | | // confirmButtonText: "确定", |
| | | // cancelButtonText: "取消", |
| | | // type: "warning", |
| | | // }) |
| | | // .then(() => {}) |
| | | // .catch(() => {}); |
| | | return Promise.reject(error) |
| | | } |
| | | ) |