简历投递添加确认弹窗、企业招聘会自动更新统一社会信用代码及userid
This commit is contained in:
@@ -323,46 +323,59 @@
|
||||
const deliveringJobs = reactive({});
|
||||
// 岗位投递
|
||||
function deliverResume(job) {
|
||||
if(deliveringJobs[job.jobId]) return
|
||||
deliveringJobs[job.jobId] = true
|
||||
const raw = uni.getStorageSync("Padmin-Token");
|
||||
const token = typeof raw === "string" ? raw.trim() : "";
|
||||
const headers = token ? {
|
||||
Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}`
|
||||
} : {};
|
||||
|
||||
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData1) => {
|
||||
if (resData1.code == 200) {
|
||||
$api.myRequest("/system/user/login/user/info", {}, "GET", 10100, headers).then((resData) => {
|
||||
$api.myRequest("/jobfair/public/job-fair-person-job/insert", {
|
||||
jobFairId: job.jobFairId, // 招聘会id
|
||||
personId: resData.info.userId, // 当前登录用户id
|
||||
enterpriseId: job.companyId, // 企业id
|
||||
jobId: job.jobId, // 岗位id
|
||||
idCard:resData.info.personCardNo
|
||||
}, "post", 9100, {
|
||||
"Content-Type": "application/json"
|
||||
}).then((data) => {
|
||||
if (data && data.code === 200) {
|
||||
$api.msg("简历投递成功");
|
||||
if (!job.jobFairPersonJob) {
|
||||
job.jobFairPersonJob = {};
|
||||
}
|
||||
job.jobFairPersonJob.status = "1";
|
||||
getList(false);
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "请确认是否投递简历?",
|
||||
showCancel: true,
|
||||
confirmText: "确定",
|
||||
cancelText: "取消",
|
||||
success: (res) => {
|
||||
if(res.confirm){
|
||||
if(deliveringJobs[job.jobId]) return
|
||||
deliveringJobs[job.jobId] = true
|
||||
const raw = uni.getStorageSync("Padmin-Token");
|
||||
const token = typeof raw === "string" ? raw.trim() : "";
|
||||
const headers = token ? {
|
||||
Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}`
|
||||
} : {};
|
||||
|
||||
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData1) => {
|
||||
if (resData1.code == 200) {
|
||||
$api.myRequest("/system/user/login/user/info", {}, "GET", 10100, headers).then((resData) => {
|
||||
$api.myRequest("/jobfair/public/job-fair-person-job/insert", {
|
||||
jobFairId: job.jobFairId, // 招聘会id
|
||||
personId: resData.info.userId, // 当前登录用户id
|
||||
enterpriseId: job.companyId, // 企业id
|
||||
jobId: job.jobId, // 岗位id
|
||||
idCard:resData.info.personCardNo
|
||||
}, "post", 9100, {
|
||||
"Content-Type": "application/json"
|
||||
}).then((data) => {
|
||||
if (data && data.code === 200) {
|
||||
$api.msg("简历投递成功");
|
||||
if (!job.jobFairPersonJob) {
|
||||
job.jobFairPersonJob = {};
|
||||
}
|
||||
job.jobFairPersonJob.status = "1";
|
||||
getList(false);
|
||||
} else {
|
||||
$api.msg((data && data.msg) || "简历投递失败");
|
||||
}
|
||||
deliveringJobs[job.jobId] = false
|
||||
});
|
||||
});
|
||||
} else {
|
||||
$api.msg((data && data.msg) || "简历投递失败");
|
||||
$api.msg('请先登录');
|
||||
deliveringJobs[job.jobId] =false
|
||||
}
|
||||
deliveringJobs[job.jobId] = false
|
||||
}).catch(() => {
|
||||
deliveringJobs[job.jobId] =false;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
$api.msg('请先登录');
|
||||
deliveringJobs[job.jobId] =false
|
||||
}
|
||||
|
||||
}
|
||||
}).catch(() => {
|
||||
deliveringJobs[job.jobId] =false;
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 提交面试邀请
|
||||
|
||||
Reference in New Issue
Block a user