|
@@ -21,7 +21,6 @@ const CONTENT_TYPE_ARRAY = {
|
|
|
};
|
|
|
|
|
|
function getHeaders(config = {}) {
|
|
|
- console.log(24, '接口返送出去的config', config);
|
|
|
const { contentType = 'json' } = config;
|
|
|
const ct = CONTENT_TYPE_ARRAY[contentType];
|
|
|
let header = {
|
|
@@ -52,7 +51,6 @@ function handleConfig(config = {}) {
|
|
|
if (noToken) {
|
|
|
delete header.Authorization;
|
|
|
}
|
|
|
- console.log(525252, header);
|
|
|
return { header, ...config };
|
|
|
}
|
|
|
|
|
@@ -175,7 +173,7 @@ export const createAxiosByinterceptors = (config) => {
|
|
|
}
|
|
|
// 错误信息提示
|
|
|
const { code, langMessage, message } = error.response.data;
|
|
|
- const codeList = ['INTERNAL_SERVER_ERROR', 'VALIDATION_FAILED', 'CAR_NOT_FOUND', 'CAR_HAS_PLATE', "NOT_FOUND", "LOCAL_PARK_ERROR", "LOCK_OCCUPIED", "REMOTE_CALL_FAIL"]; // 默认处理的错误code
|
|
|
+ const codeList = ['INTERNAL_SERVER_ERROR', 'VALIDATION_FAILED', 'CAR_NOT_FOUND', 'CAR_HAS_PLATE', "NOT_FOUND", "LOCAL_PARK_ERROR", "LOCK_OCCUPIED", "REMOTE_CALL_FAIL", 'PLEASE_SCAN_QRCODE']; // 默认处理的错误code
|
|
|
if (codeList.indexOf(code) > -1) {
|
|
|
uni.showToast({ title: langMessage || message, duration: 3000, icon: 'fail' });
|
|
|
}
|