错误提示

This commit is contained in:
daihh
2022-11-25 11:25:15 +08:00
parent c8a12a27b8
commit 44aeab29d8
2 changed files with 8 additions and 2 deletions

View File

@@ -47,6 +47,9 @@ const formRequest=axios.create({
Promise.reject(error) Promise.reject(error)
}); });
formRequest.interceptors.response.use(res => { formRequest.interceptors.response.use(res => {
console.log(res);
res.data=JSON.parse(res.data);
const code = res.data.status || 200; const code = res.data.status || 200;
if(code===200){ if(code===200){
return res.data return res.data
@@ -67,7 +70,7 @@ const formRequest=axios.create({
} }
}, },
error => { error => {
console.log('err' + error) console.log('err',error)
let { message } = error; let { message } = error;
if (message == "Network Error") { if (message == "Network Error") {
message = "网络异常,请稍后重试"; message = "网络异常,请稍后重试";

View File

@@ -1382,9 +1382,10 @@ export default {
}; };
this.btnLoading = true; this.btnLoading = true;
let $this = this; let $this = this;
console.log(this.courseInfo.orgId,'this.courseInfo.orgId') //console.log(this.courseInfo.orgId,'this.courseInfo.orgId')
//先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息 //先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{ apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
if(rs.status==200 && rs.result){ if(rs.status==200 && rs.result){
postData.auditUser={ postData.auditUser={
email:rs.result.email, email:rs.result.email,
@@ -1430,6 +1431,8 @@ export default {
$this.btnLoading = false; $this.btnLoading = false;
this.$message.error('获取审核HRBP失败:'+rs.message); this.$message.error('获取审核HRBP失败:'+rs.message);
} }
}).catch(err=>{
this.$message.error('获取审核HRBP失败:'+err);
}) })
}, },