From 9a5bffae855e6337180bc38c70f3206aefacc29f Mon Sep 17 00:00:00 2001 From: xiebing Date: Fri, 28 Nov 2025 17:22:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B2=97=E4=BD=8D=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E4=BD=8D=E7=BD=AE=E6=8F=92=E5=85=A5=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E9=9A=8F=E6=9C=BA=E6=8F=92=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packageA/pages/selectDate/selectDate.vue | 7 ++++++- pages/index/components/index-one.vue | 17 +++++++++++++++-- pages/index/components/index-refactor.vue | 11 ++++++++++- pages/msglog/read.vue | 3 ++- pages/msglog/unread.vue | 3 ++- 5 files changed, 35 insertions(+), 6 deletions(-) diff --git a/packageA/pages/selectDate/selectDate.vue b/packageA/pages/selectDate/selectDate.vue index 03cf809..0745cdb 100644 --- a/packageA/pages/selectDate/selectDate.vue +++ b/packageA/pages/selectDate/selectDate.vue @@ -24,8 +24,9 @@ {{ vItem.title }} { } }); +function machHasZph(item) { + return true +} + function backParams() { if (isValidDateString(current.value.date)) { navBack({ diff --git a/pages/index/components/index-one.vue b/pages/index/components/index-one.vue index 45a519a..82ea171 100644 --- a/pages/index/components/index-one.vue +++ b/pages/index/components/index-one.vue @@ -359,7 +359,11 @@ function getJobRecommend(type = 'add') { ...pageState.search, ...conditionSearch.value, }; - let comd = { recommend: true, jobCategory: '', tip: '确认你的兴趣,为您推荐更多合适的岗位' }; + let comd = { + recommend: true, + jobCategory: '', + tip: '确认你的兴趣,为您推荐更多合适的岗位', + }; $api.createRequest('/app/job/recommend', params).then((resData) => { const { data, total } = resData; pageState.total = 0; @@ -380,7 +384,16 @@ function getJobRecommend(type = 'add') { if (question) { comd.jobCategory = question; - data.unshift(comd); + // 生成随机插入位置,排除前两个和最后两个位置 + let insertIndex; + if (data.length <= 4) { + // 如果数据长度小于等于4,直接插入到中间位置 + insertIndex = Math.floor(data.length / 2); + } else { + // 生成2到data.length-2之间的随机位置 + insertIndex = Math.floor(Math.random() * (data.length - 4)) + 2; + } + data.splice(insertIndex, 0, comd); } } const reslist = dataToImg(data); diff --git a/pages/index/components/index-refactor.vue b/pages/index/components/index-refactor.vue index e0a866d..f710571 100644 --- a/pages/index/components/index-refactor.vue +++ b/pages/index/components/index-refactor.vue @@ -596,7 +596,16 @@ function getJobRecommend(type = 'add') { if (question) { comd.jobCategory = question; - data.unshift(comd); + // 生成随机插入位置,排除前两个和最后两个位置 + let insertIndex; + if (data.length <= 4) { + // 如果数据长度小于等于4,直接插入到中间位置 + insertIndex = Math.floor(data.length / 2); + } else { + // 生成2到data.length-2之间的随机位置 + insertIndex = Math.floor(Math.random() * (data.length - 4)) + 2; + } + data.splice(insertIndex, 0, comd); } } const reslist = dataToImg(data); diff --git a/pages/msglog/read.vue b/pages/msglog/read.vue index 58d67a9..235ba8b 100644 --- a/pages/msglog/read.vue +++ b/pages/msglog/read.vue @@ -1,6 +1,6 @@ diff --git a/pages/msglog/unread.vue b/pages/msglog/unread.vue index 9181049..1643c08 100644 --- a/pages/msglog/unread.vue +++ b/pages/msglog/unread.vue @@ -1,6 +1,6 @@ From 7ce14fa7e2744c97010881d7b6b6a70b89f79881 Mon Sep 17 00:00:00 2001 From: xiebing Date: Fri, 28 Nov 2025 18:17:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=97=A5=E6=9C=9F=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packageA/pages/selectDate/selectDate.vue | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/packageA/pages/selectDate/selectDate.vue b/packageA/pages/selectDate/selectDate.vue index 0745cdb..c686301 100644 --- a/packageA/pages/selectDate/selectDate.vue +++ b/packageA/pages/selectDate/selectDate.vue @@ -24,9 +24,9 @@ {{ vItem.title }} { + updateDateArray() if (options.date) { current.value = { date: options?.date || null, @@ -80,8 +83,18 @@ onLoad((options) => { } }); -function machHasZph(item) { - return true +function hasZphInData(item) { + return hasZphDateArray.value.some(date=>date == item.date) +} + +async function updateDateArray() { + if(localStorage.getItem('hasZphDateArray')) hasZphDateArray.value = localStorage.getItem('hasZphDateArray') + + let res = await $api.createRequest('/app/internal/getDateList', {}, 'get') + if(res.data){ + hasZphDateArray.value = res.data + localStorage.setItem('hasZphDateArray',res.data) + } } function backParams() {