From cb5d210f91f3a26ee123cb0d1e611ad897723e01 Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Fri, 13 Feb 2026 10:52:42 +0800 Subject: [PATCH] =?UTF-8?q?feat(CP=E6=8E=92=E8=A1=8C=E6=A6=9C=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2):=20=E6=98=9F=E5=BA=A7=E6=A6=9C=E9=A6=96=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Ranking/Couple/index.vue | 40 ++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/src/views/Ranking/Couple/index.vue b/src/views/Ranking/Couple/index.vue index 2267d49..916a304 100644 --- a/src/views/Ranking/Couple/index.vue +++ b/src/views/Ranking/Couple/index.vue @@ -57,7 +57,7 @@ v-for="(item, index) in seasonTop1List" style="z-index: 1; min-width: 0; flex-shrink: 0; transition: all 0.8s ease" :style="{ width: index === centerIndex ? '60vw' : '40vw' }" - :imgUrl="imageUrl('topCoupleFrame')" + :imgUrl="imageUrl('AquariusCoupleFrame')" :contentStyle="``" @click="moveToCenter(index)" > @@ -79,7 +79,7 @@ > -
Season1
-
2026.1.20-2.18
+
+ Season{{ centerIndex + 1 }} +
+
+ {{ twelveSigns[centerIndex]?.time }} +
@@ -1419,6 +1423,21 @@ const centerIndex = ref(0) // 默认中间项的索引为1 const touchStartX = ref(0) const touchEndX = ref(0) +const twelveSigns = ref([ + { name: 'Aquarius', time: '2026.1.20-2.18', bgUrl: imageUrl('AquariusCoupleFrame') }, + { name: 'Pisces', time: '2026.2.19-3.20', bgUrl: imageUrl('PiscesCoupleFrame') }, + { name: 'Aries', time: '2026.3.21-4.19', bgUrl: imageUrl('') }, + { name: 'Taurus', time: '2026.4.20-5.20', bgUrl: imageUrl('') }, + { name: 'Gemini', time: '2026.5.21-6.21', bgUrl: imageUrl('') }, + { name: 'Cancer', time: '2026.6.22-7.22', bgUrl: imageUrl('') }, + { name: 'Leo', time: '2026.7.23-8.22', bgUrl: imageUrl('') }, + { name: 'Virgo', time: '2026.8.23-9.22', bgUrl: imageUrl('') }, + { name: 'Libra', time: '2026.9.23-10.22', bgUrl: imageUrl('') }, + { name: 'Scorpio', time: '2026.10.23-11.21', bgUrl: imageUrl('') }, + { name: 'Sagittarius', time: '2026.11.22-12.21', bgUrl: imageUrl('') }, + { name: 'Capricorn', time: '2026.12.22-1.19', bgUrl: imageUrl('') }, +]) + // 计算移动到中心位置的函数 const moveToCenter = (targetIndex) => { if (centerIndex.value == targetIndex) return // 如果当前索引和目标索引相同,则不需要移动 @@ -1671,8 +1690,11 @@ const getLoveLetterWall = async () => { const getCpSeasonTop1List = async () => { const resCpSeasonTop1List = await apiGetCpSeasonTop1List() if (resCpSeasonTop1List.status && resCpSeasonTop1List.body) { - // seasonTop1List.value = resCpSeasonTop1List.body - seasonTop1List.value = [{}] + if (Array.isArray(resCpSeasonTop1List.body) && resCpSeasonTop1List.body.length > 0) { + seasonTop1List.value = resCpSeasonTop1List.body + } else { + seasonTop1List.value = [{}] + } } } @@ -1775,7 +1797,9 @@ const preloadCriticalImages = async () => { // 历史榜首 imageUrl(getImgName('historyTopBg')), - imageUrl('topCoupleFrame'), + // imageUrl('topCoupleFrame'), + imageUrl('AquariusCoupleFrame'), + imageUrl('PiscesCoupleFrame'), // 按钮 imageUrl(getImgName('rankingBtActive')),