From cb1052346ea60f3cd548f772cb73576b16efc1aa Mon Sep 17 00:00:00 2001 From: xiebing Date: Thu, 11 Dec 2025 14:04:17 +0800 Subject: [PATCH] =?UTF-8?q?feat=20:=20=E8=B6=B3=E8=BF=B9=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=96=B0=E5=A2=9E=E6=9C=89=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E7=9A=84=E6=97=A5=E6=9C=9F=E9=A1=B9;=20request=E6=94=B9?= =?UTF-8?q?=E4=B8=BAproxy=20+=20header=20url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.js | 4 ++-- packageA/pages/selectDate/selectDate.vue | 28 +++++++++++++++++++++--- pages/login/login.vue | 2 +- utils/request.js | 6 +++-- 4 files changed, 32 insertions(+), 8 deletions(-) diff --git a/config.js b/config.js index 5da92a2..6647280 100644 --- a/config.js +++ b/config.js @@ -1,6 +1,6 @@ export default { - baseUrl: 'https://fw.rc.qingdao.gov.cn/rgpp-api/api', // 内网 - // baseUrl: 'https://qd.zhaopinzao8dian.com/api', // 测试 + // baseUrl: 'https://fw.rc.qingdao.gov.cn/rgpp-api/api', // 内网 + baseUrl: 'https://qd.zhaopinzao8dian.com/api', // 测试 // baseUrl: 'http://192.168.3.29:8081', // baseUrl: 'http://10.213.6.207:19010/api', // 语音转文字 diff --git a/packageA/pages/selectDate/selectDate.vue b/packageA/pages/selectDate/selectDate.vue index 3702623..9984b24 100644 --- a/packageA/pages/selectDate/selectDate.vue +++ b/packageA/pages/selectDate/selectDate.vue @@ -26,7 +26,7 @@ { @@ -76,6 +77,7 @@ onLoad((options) => { new Array(recordNum.value + 1).fill(null).map(() => { addMonth(); }); + updateViewRecordDateArray() } else { initPagesDate(); new Array(recordNum.value).fill(null).map(() => { @@ -83,7 +85,7 @@ onLoad((options) => { }); } if (options.entrance === 'careerfair') { - updateDateArray(); + updateCareerFairDateArray(); } }); @@ -92,6 +94,17 @@ function hasZphInData(item) { return false; } + const dateArray = Array.isArray(hasViewRecordDateArray.value) ? hasViewRecordDateArray.value : []; + + return dateArray.some((date) => { + return typeof date === 'string' && date === item.date; + }); +} +function hasViewRecordInData(item) { + if (!item || typeof item.date !== 'string') { + return false; + } + const dateArray = Array.isArray(hasZphDateArray.value) ? hasZphDateArray.value : []; return dateArray.some((date) => { @@ -99,7 +112,7 @@ function hasZphInData(item) { }); } -async function updateDateArray() { +async function updateCareerFairDateArray() { const LoadCache = (resData) => { if (resData.code === 200) { hasZphDateArray.value = resData.data; @@ -107,6 +120,14 @@ async function updateDateArray() { }; $api.createRequestWithCache('/app/internal/getDateList', {}, 'GET', false, {}, LoadCache).then(LoadCache); } +async function updateViewRecordDateArray() { + const LoadCache = (resData) => { + if (resData.code === 200) { + hasViewRecordDateArray.value = resData.data; + } + }; + $api.createRequestWithCache('/app/user/getJobReviewDate', {}, 'GET', false, {}, LoadCache).then(LoadCache); +} function backParams() { if (isValidDateString(current.value.date)) { @@ -307,6 +328,7 @@ function getMonthCalendarData({ year, month, selectableDates = [] }) { justify-content: center border-radius: 20rpx 20rpx 20rpx 20rpx; padding: 16rpx 0 + margin: 0 2rpx; margin-bottom: 20rpx .item-top{ font-weight: 600; diff --git a/pages/login/login.vue b/pages/login/login.vue index f48f8d3..936a6b7 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -110,7 +110,7 @@ - diff --git a/utils/request.js b/utils/request.js index fe39634..c354acb 100644 --- a/utils/request.js +++ b/utils/request.js @@ -82,7 +82,8 @@ export function createRequest(url, data = {}, method = 'GET', loading = false, h }) } let header = { - ...headers + ...headers, + 'X-Target-URI': url }; const userStore = useUserStore(); const token = userStore.token; @@ -117,7 +118,8 @@ export function createRequest(url, data = {}, method = 'GET', loading = false, h // ------------------------------------------------------------------ return new Promise((resolve, reject) => { uni.request({ - url: config.baseUrl + url, + url: config.baseUrl + '/app/proxy', + // url: config.baseUrl + url, method: method, data: requestData, header,