瓶中沙 2024-06-26 15:51:37 +08:00
commit e2100394db
4 changed files with 7 additions and 9 deletions

View File

@ -119,7 +119,6 @@ const infoApi = {
return postPBRequest('/driver', null, 54001)
},
//
//
getTxTemplate(params) {
return postPBRequest("/driver", params, 54011, params.driver_name);
},

View File

@ -70,7 +70,6 @@ export default {
driver_name: props.formData.name
}
const res = await infoApi.getTxTemplate(param);
if (res.code == 0) {
//
state.modelArr = [];
@ -84,7 +83,7 @@ export default {
}
state.addForm.template_name = state.modelArr[0].name;
} else {
ElMessage.error(res.data || res.messgae);
ElMessage.error(res.data || res.message);
}
};
const closeDialog = () => {

View File

@ -79,6 +79,7 @@ export default {
if (res.code == 0) {
state.propertiesData = res.data || [];
} else {
ElMessage.error(res.data || res.message);
}
};
const closeDialog = () => {

View File

@ -35,21 +35,20 @@ axios.interceptors.response.use(
}
}
}
if(res.config.headers['action'] == 53211) { //
if(!res.request || res.request.responseType === 'blob') { //
return res;
}
const ret = res.data;
// token
if (ret.code === 3004) {
if (res.data.code === 3004) {
localRemove("token");
ElMessage.closeAll();
ElMessage.error(ret.message || "Token异常,请重新登录");
ElMessage.error(res.data.message || "Token异常,请重新登录");
router.push({
path: "/login"
});
return Promise.reject(ret);
return Promise.reject(res.data);
}
return ret;
return Promise.resolve(res.data);
},
(error) => {
ElMessage.closeAll();