| | |
| | | return Promise.reject(response.data) |
| | | } else { |
| | | if (response.data.ErrCode === 'E' && /死锁/.test(response.data.message)) { |
| | | response.data.message = '服务器繁忙,请稍后重试!' |
| | | response.data.ErrMesg = '服务器繁忙,请稍后重试!' |
| | | response.data.message = window.GLOB.dict['server_busy'] || '服务器繁忙,请稍后重试!' |
| | | response.data.ErrMesg = response.data.message |
| | | } |
| | | if (response.config.requestId) { |
| | | response.data.$requestId = response.config.requestId |
| | |
| | | }, (error) => { |
| | | let response = error.response || '' |
| | | |
| | | if (response && response.status) { |
| | | if (!response) { |
| | | notification.error({ |
| | | className: 'notification-custom-error', |
| | | bottom: 0, |
| | | message: error.message.includes('Network Error') && lang === 'zh-CN' ? '网络连接失败!' : error.message, |
| | | placement: 'bottomRight', |
| | | duration: 15 |
| | | }) |
| | | } else if (response && response.status) { |
| | | notification.error({ |
| | | className: 'notification-custom-error', |
| | | bottom: 0, |