简历投递添加确认弹窗、企业招聘会自动更新统一社会信用代码及userid
This commit is contained in:
@@ -323,46 +323,59 @@
|
|||||||
const deliveringJobs = reactive({});
|
const deliveringJobs = reactive({});
|
||||||
// 岗位投递
|
// 岗位投递
|
||||||
function deliverResume(job) {
|
function deliverResume(job) {
|
||||||
if(deliveringJobs[job.jobId]) return
|
uni.showModal({
|
||||||
deliveringJobs[job.jobId] = true
|
title: "提示",
|
||||||
const raw = uni.getStorageSync("Padmin-Token");
|
content: "请确认是否投递简历?",
|
||||||
const token = typeof raw === "string" ? raw.trim() : "";
|
showCancel: true,
|
||||||
const headers = token ? {
|
confirmText: "确定",
|
||||||
Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}`
|
cancelText: "取消",
|
||||||
} : {};
|
success: (res) => {
|
||||||
|
if(res.confirm){
|
||||||
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData1) => {
|
if(deliveringJobs[job.jobId]) return
|
||||||
if (resData1.code == 200) {
|
deliveringJobs[job.jobId] = true
|
||||||
$api.myRequest("/system/user/login/user/info", {}, "GET", 10100, headers).then((resData) => {
|
const raw = uni.getStorageSync("Padmin-Token");
|
||||||
$api.myRequest("/jobfair/public/job-fair-person-job/insert", {
|
const token = typeof raw === "string" ? raw.trim() : "";
|
||||||
jobFairId: job.jobFairId, // 招聘会id
|
const headers = token ? {
|
||||||
personId: resData.info.userId, // 当前登录用户id
|
Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}`
|
||||||
enterpriseId: job.companyId, // 企业id
|
} : {};
|
||||||
jobId: job.jobId, // 岗位id
|
|
||||||
idCard:resData.info.personCardNo
|
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData1) => {
|
||||||
}, "post", 9100, {
|
if (resData1.code == 200) {
|
||||||
"Content-Type": "application/json"
|
$api.myRequest("/system/user/login/user/info", {}, "GET", 10100, headers).then((resData) => {
|
||||||
}).then((data) => {
|
$api.myRequest("/jobfair/public/job-fair-person-job/insert", {
|
||||||
if (data && data.code === 200) {
|
jobFairId: job.jobFairId, // 招聘会id
|
||||||
$api.msg("简历投递成功");
|
personId: resData.info.userId, // 当前登录用户id
|
||||||
if (!job.jobFairPersonJob) {
|
enterpriseId: job.companyId, // 企业id
|
||||||
job.jobFairPersonJob = {};
|
jobId: job.jobId, // 岗位id
|
||||||
}
|
idCard:resData.info.personCardNo
|
||||||
job.jobFairPersonJob.status = "1";
|
}, "post", 9100, {
|
||||||
getList(false);
|
"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 {
|
} 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;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提交面试邀请
|
// 提交面试邀请
|
||||||
|
|||||||
@@ -339,11 +339,27 @@
|
|||||||
// 正确映射响应为用户信息(优先使用 data 字段)
|
// 正确映射响应为用户信息(优先使用 data 字段)
|
||||||
const data = resData?.data ?? resData;
|
const data = resData?.data ?? resData;
|
||||||
userInfo.value = data || {};
|
userInfo.value = data || {};
|
||||||
|
if(data?.info?.entCreditCode && data?.info?.userId){
|
||||||
|
updateEnterpriseId({
|
||||||
|
unifiedSocialCreditCode: data?.info?.entCreditCode,
|
||||||
|
userId: data?.info?.userId,
|
||||||
|
})
|
||||||
|
}
|
||||||
getFair("refresh");
|
getFair("refresh");
|
||||||
return userInfo.value;
|
return userInfo.value;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function updateEnterpriseId(params){
|
||||||
|
const headers = {
|
||||||
|
'Content-Type':'application/json'
|
||||||
|
}
|
||||||
|
return $api.myRequest("/jobfair/public/job-fair-sign-up-enterprise/update-enterprise-id", params, "POST", 9100, headers).then((resData) => {
|
||||||
|
if(resData.code == 200 && resData.data !=0){
|
||||||
|
state.current = 3
|
||||||
|
getMyFair("refresh");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
function getMyFair(type = "add") {
|
function getMyFair(type = "add") {
|
||||||
if (type === "refresh") {
|
if (type === "refresh") {
|
||||||
pageState.pageNum = 1;
|
pageState.pageNum = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user