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')),