From 5430678eaff68de336afb03076e514b944c46e0d Mon Sep 17 00:00:00 2001 From: xuchao <1151716571@qq.com> Date: Tue, 20 Jan 2026 12:07:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8E=86=E6=8A=95=E9=80=92=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=A1=AE=E8=AE=A4=E5=BC=B9=E7=AA=97=E3=80=81=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E6=8B=9B=E8=81=98=E4=BC=9A=E8=87=AA=E5=8A=A8=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=BB=9F=E4=B8=80=E7=A4=BE=E4=BC=9A=E4=BF=A1=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=8F=8Auserid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packageB/jobFair/detailPerson.vue | 85 ++++++++++++++++++------------- pages/careerfair/careerfair.vue | 18 ++++++- 2 files changed, 66 insertions(+), 37 deletions(-) diff --git a/packageB/jobFair/detailPerson.vue b/packageB/jobFair/detailPerson.vue index f9e8557..1c44d63 100644 --- a/packageB/jobFair/detailPerson.vue +++ b/packageB/jobFair/detailPerson.vue @@ -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; - }); + }) + } // 提交面试邀请 diff --git a/pages/careerfair/careerfair.vue b/pages/careerfair/careerfair.vue index db9a562..c9eae87 100644 --- a/pages/careerfair/careerfair.vue +++ b/pages/careerfair/careerfair.vue @@ -339,11 +339,27 @@ // 正确映射响应为用户信息(优先使用 data 字段) const data = resData?.data ?? resData; userInfo.value = data || {}; + if(data?.info?.entCreditCode && data?.info?.userId){ + updateEnterpriseId({ + unifiedSocialCreditCode: data?.info?.entCreditCode, + userId: data?.info?.userId, + }) + } getFair("refresh"); 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") { if (type === "refresh") { pageState.pageNum = 1;