From 3fc587725ab0e4ec40b012338f40b8d13f1725f2 Mon Sep 17 00:00:00 2001 From: FengHui Date: Sat, 9 May 2026 13:10:18 +0800 Subject: [PATCH] 11 --- packageA/pages/post/post.vue | 12 ++++++++++-- utils/request.js | 8 ++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/packageA/pages/post/post.vue b/packageA/pages/post/post.vue index 62ee99b..4ada270 100644 --- a/packageA/pages/post/post.vue +++ b/packageA/pages/post/post.vue @@ -157,7 +157,8 @@ 竞争力分析 - 三个月内共15位求职者申请,你的简历匹配度为{{ raderData.matchScore }}分,排名位于第{{ + {{ JSON.stringify(raderData) }} + 三个月内共{{ raderData.totalApplicants }} 位求职者申请,你的简历匹配度为{{ raderData.matchScore }}分,排名位于第{{ raderData.rank }}位,超过{{ raderData.percentile }}%的竞争者,处在优秀位置。 @@ -277,6 +278,7 @@ const raderData = ref({ matchScore: 0, rank: 0, percentile: 0, + totalApplicants: 0, radarChart: { skill: 0, experience: 0, @@ -387,6 +389,7 @@ function getCompetivetuveness(encryptJobId) { $api.createRequest(`/app/job/competitiveness/${encryptJobId}`, {}, 'GET').then((resData) => { // 如果接口返回的数据为 null 或空,使用默认值0 if (resData && resData.data) { + console.log(resData.data, 'resData.data'); // 确保 radarChart 字段存在,如果不存在则使用默认值 const radarChart = resData.data.radarChart || { skill: 0, @@ -401,7 +404,9 @@ function getCompetivetuveness(encryptJobId) { matchScore: resData.data.matchScore || 0, rank: resData.data.rank || 0, percentile: resData.data.percentile || 0, - radarChart: radarChart + totalApplicants: resData.data.totalApplicants || 0, + radarChart: radarChart, + percentile: resData.data.percentile || 0, }; currentStep.value = (resData.data.matchScore || 0) * 0.04; } else { @@ -410,6 +415,7 @@ function getCompetivetuveness(encryptJobId) { matchScore: 0, rank: 0, percentile: 0, + totalApplicants: 0, radarChart: { skill: 0, experience: 0, @@ -469,8 +475,10 @@ function confirmAction() { showConfirmDialog.value = false; }); } else { + console.log(encryptJobId, 'encryptJobId'); // 确认投递 $api.createRequest(`/app/job/apply/${encryptJobId}`, {}, 'GET').then((resData) => { + console.log(resData, 'job/apply/'); $api.msg('申请成功'); getDetail(encryptJobId); // 刷新职位信息 showConfirmDialog.value = false; diff --git a/utils/request.js b/utils/request.js index 5f30662..3369166 100644 --- a/utils/request.js +++ b/utils/request.js @@ -189,10 +189,10 @@ export function createRequest(url, data = {}, method = 'GET', loading = false, h } // 显示具体的错误信息 const errorMsg = msg || '请求出现异常,请联系工作人员' - uni.showToast({ - title: errorMsg, - icon: 'none' - }) + // uni.showToast({ + // title: errorMsg, + // icon: 'none' + // }) const err = new Error(errorMsg) err.error = resData reject(err)