|
@@ -225,12 +225,11 @@ export const createAxiosByinterceptors = (config) => {
|
|
|
return response.data;
|
|
|
},
|
|
|
function (error) {
|
|
|
- console.error('error.config.url', error.config.url)
|
|
|
console.log('error', error);
|
|
|
// 请求超时
|
|
|
- if (error.code === 'ECONNABORTED') {
|
|
|
+ if (error?.code === 'ECONNABORTED') {
|
|
|
let msg = '请求超时,请稍后重试'
|
|
|
- if(error.config.url.indexOf('parking-lots/lbs') > -1 || error.config.url.indexOf('/parking/unlicensed-car-checkout') > -1 || error.config.url.indexOf('/parking/check-out') > -1) {
|
|
|
+ if(error?.config?.url.indexOf('parking-lots/lbs') > -1 || error?.config?.url.indexOf('/parking/unlicensed-car-checkout') > -1 || error?.config?.url.indexOf('/parking/check-out') > -1) {
|
|
|
msg = '车场连接有问题,请联系服务台!'
|
|
|
}
|
|
|
Toast.clear()
|