From f074c29aeb27a4491d104d7c22ad4b7ef668ec92 Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Mon, 18 May 2026 15:17:05 +0800 Subject: [PATCH] =?UTF-8?q?chore(=E6=8E=92=E8=A1=8C=E6=A6=9C=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2):=20=E5=85=A8=E9=83=A8oss=E7=9A=84png=E8=BD=ACwebp?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ranking/Couple/GamePlay/Gameplay.vue | 24 +-- .../Couple/GamePlay/components/exchange.vue | 8 +- .../Couple/GamePlay/components/lottery.vue | 16 +- .../Couple/GamePlay/components/signIn.vue | 8 +- .../Couple/GamePlay/components/signInItem.vue | 12 +- src/views/Ranking/Couple/Ranking.vue | 42 ++--- .../Ranking/Couple/components/Barrage.vue | 17 +- .../Ranking/Couple/components/topUser.vue | 20 +- src/views/Ranking/Couple/index.vue | 178 +++++++++--------- src/views/Ranking/GamesKing/index.vue | 162 ++++++++-------- src/views/Ranking/KingAndQueen/TopList.vue | 116 ++++++------ .../KingAndQueen/components/borderImg.vue | 6 +- src/views/Ranking/Overall/Ranking.vue | 30 +-- src/views/Ranking/WeeklyStar/WeeklyStar.vue | 137 +++++++------- 14 files changed, 380 insertions(+), 396 deletions(-) diff --git a/src/views/Ranking/Couple/GamePlay/Gameplay.vue b/src/views/Ranking/Couple/GamePlay/Gameplay.vue index 4a699ec..698fe50 100644 --- a/src/views/Ranking/Couple/GamePlay/Gameplay.vue +++ b/src/views/Ranking/Couple/GamePlay/Gameplay.vue @@ -18,14 +18,14 @@ @@ -36,14 +36,14 @@ @@ -54,14 +54,14 @@ @@ -72,7 +72,7 @@
@@ -99,7 +99,7 @@
@@ -120,7 +120,7 @@ import { computed, onMounted, onUnmounted, ref } from 'vue' import { useRoute, useRouter } from 'vue-router' import { useLangStore } from '@/stores/lang' import { useI18n } from 'vue-i18n' -import { getPngUrl } from '@/config/imagePaths.js' +import { getWebpUrl } from '@/config/imagePaths.js' import { getUserId, setUserInfo } from '@/utils/userStore.js' import { viewUserInfo } from '@/utils/appBridge.js' import { connectToApp } from '@/utils/appConnector.js' @@ -158,7 +158,7 @@ const currentLangType = computed(() => { const isLoading = ref(true) // 预加载状态 // 获取OSS图片URL的函数 -const imageUrl = (filename) => getPngUrl('Ranking/Couple/', filename) +const webpUrl = (filename) => getWebpUrl('Ranking/CoupleWebp/', filename) // 根据语言获取图片名 const getImgName = (filename) => { diff --git a/src/views/Ranking/Couple/GamePlay/components/exchange.vue b/src/views/Ranking/Couple/GamePlay/components/exchange.vue index c254d76..be2de53 100644 --- a/src/views/Ranking/Couple/GamePlay/components/exchange.vue +++ b/src/views/Ranking/Couple/GamePlay/components/exchange.vue @@ -4,7 +4,7 @@ style="min-height: 35.3vw" v-for="item in goodsList" :key="item.id" - :imgUrl="imageUrl('goodsItem')" + :imgUrl="webpUrl('goodsItem')" :contentStyle="`flex-direction: column;justify-content: space-between;align-items: center;`" >
@@ -68,7 +68,7 @@ import { computed, onMounted, onUnmounted, ref } from 'vue' import { useRoute, useRouter } from 'vue-router' import { useLangStore } from '@/stores/lang' import { useI18n } from 'vue-i18n' -import { getPngUrl } from '@/config/imagePaths.js' +import { getWebpUrl } from '@/config/imagePaths.js' import { getUserId, setUserInfo } from '@/utils/userStore.js' import { viewUserInfo } from '@/utils/appBridge.js' import { connectToApp } from '@/utils/appConnector.js' @@ -101,7 +101,7 @@ const currentLangType = computed(() => { const isLoading = ref(true) // 预加载状态 // 获取OSS图片URL的函数 -const imageUrl = (filename) => getPngUrl('Ranking/Couple/', filename) +const webpUrl = (filename) => getWebpUrl('Ranking/CoupleWebp/', filename) // 根据语言获取图片名 const getImgName = (filename) => { diff --git a/src/views/Ranking/Couple/GamePlay/components/lottery.vue b/src/views/Ranking/Couple/GamePlay/components/lottery.vue index 15c3911..08a4ef7 100644 --- a/src/views/Ranking/Couple/GamePlay/components/lottery.vue +++ b/src/views/Ranking/Couple/GamePlay/components/lottery.vue @@ -2,13 +2,13 @@
@@ -110,7 +110,7 @@ > @@ -161,7 +161,7 @@ > @@ -206,7 +206,7 @@ import { computed, onMounted, onUnmounted, ref } from 'vue' import { useRoute, useRouter } from 'vue-router' import { useLangStore } from '@/stores/lang' import { useI18n } from 'vue-i18n' -import { getPngUrl } from '@/config/imagePaths.js' +import { getWebpUrl } from '@/config/imagePaths.js' import { getUserId, setUserInfo } from '@/utils/userStore.js' import { viewUserInfo } from '@/utils/appBridge.js' import { connectToApp } from '@/utils/appConnector.js' @@ -242,7 +242,7 @@ const currentLangType = computed(() => { const isLoading = ref(true) // 预加载状态 // 获取OSS图片URL的函数 -const imageUrl = (filename) => getPngUrl('Ranking/Couple/', filename) +const webpUrl = (filename) => getWebpUrl('Ranking/CoupleWebp/', filename) // 根据语言获取图片名 const getImgName = (filename) => { diff --git a/src/views/Ranking/Couple/GamePlay/components/signIn.vue b/src/views/Ranking/Couple/GamePlay/components/signIn.vue index e369ae5..17677d0 100644 --- a/src/views/Ranking/Couple/GamePlay/components/signIn.vue +++ b/src/views/Ranking/Couple/GamePlay/components/signIn.vue @@ -3,7 +3,7 @@
@@ -52,7 +52,7 @@ v-smart-img v-for="(arrow, arrowIndex) in arrows" :key="'arrow-' + arrowIndex" - :src="imageUrl('arrowRight')" + :src="webpUrl('arrowRight')" :style="arrow.style" alt="arrow" style="position: absolute; width: 8vw; object-fit: contain" @@ -67,7 +67,7 @@ import { computed, onMounted, onUnmounted, ref } from 'vue' import { useRoute, useRouter } from 'vue-router' import { useLangStore } from '@/stores/lang' import { useI18n } from 'vue-i18n' -import { getPngUrl } from '@/config/imagePaths.js' +import { getWebpUrl } from '@/config/imagePaths.js' import { setUserInfo } from '@/utils/userStore.js' import { viewUserInfo } from '@/utils/appBridge.js' import { connectToApp } from '@/utils/appConnector.js' @@ -104,7 +104,7 @@ const currentLangType = computed(() => { const isLoading = ref(true) // 预加载状态 // 获取OSS图片URL的函数 -const imageUrl = (filename) => getPngUrl('Ranking/Couple/', filename) +const webpUrl = (filename) => getWebpUrl('Ranking/CoupleWebp/', filename) // 根据语言获取图片名 const getImgName = (filename) => { diff --git a/src/views/Ranking/Couple/GamePlay/components/signInItem.vue b/src/views/Ranking/Couple/GamePlay/components/signInItem.vue index c5f907d..25cb402 100644 --- a/src/views/Ranking/Couple/GamePlay/components/signInItem.vue +++ b/src/views/Ranking/Couple/GamePlay/components/signInItem.vue @@ -2,7 +2,7 @@
{{ t('sign_in_make_up') }}
@@ -128,7 +128,7 @@ import { handleAvatarImageError } from '@/utils/image/imageHandler.js' import { useRoute, useRouter } from 'vue-router' import { useLangStore } from '@/stores/lang' import { useI18n } from 'vue-i18n' -import { getPngUrl } from '@/config/imagePaths.js' +import { getWebpUrl } from '@/config/imagePaths.js' import { useCoupleStore } from '@/stores/couple' import { showError, showSuccess } from '@/utils/toast.js' import { storeToRefs } from 'pinia' @@ -168,7 +168,7 @@ const currentLangType = computed(() => { const isLoading = ref(true) // 预加载状态 // 获取OSS图片URL的函数 -const imageUrl = (filename) => getPngUrl('Ranking/Couple/', filename) +const webpUrl = (filename) => getWebpUrl('Ranking/CoupleWebp/', filename) // 根据语言获取图片名 const getImgName = (filename) => { @@ -198,7 +198,7 @@ const dailyConfigs = computed(() => { ...configs, { type: 'TICKET', - cover: imageUrl('crystal'), + cover: webpUrl('crystal'), content: props.rewards.lotteryTicketCount, }, ] diff --git a/src/views/Ranking/Couple/Ranking.vue b/src/views/Ranking/Couple/Ranking.vue index 8d9621a..d9049ac 100644 --- a/src/views/Ranking/Couple/Ranking.vue +++ b/src/views/Ranking/Couple/Ranking.vue @@ -16,14 +16,14 @@ @@ -33,14 +33,14 @@ @@ -49,7 +49,7 @@
@@ -77,16 +77,16 @@
- + - +
@@ -102,13 +102,13 @@ @@ -166,7 +166,7 @@ > @@ -225,7 +225,7 @@
@@ -241,7 +241,7 @@ import { computed, onMounted, onUnmounted, ref } from 'vue' import { useRoute, useRouter } from 'vue-router' import { useLangStore } from '@/stores/lang' import { useI18n } from 'vue-i18n' -import { getPngUrl } from '@/config/imagePaths.js' +import { getWebpUrl } from '@/config/imagePaths.js' import { setUserInfo } from '@/utils/userStore.js' import { viewUserInfo } from '@/utils/appBridge.js' import { connectToApp } from '@/utils/appConnector.js' @@ -252,10 +252,7 @@ import { handleAvatarImageError, handleRewardImageError } from '@/utils/image/im import { useCoupleStore } from '@/stores/couple' import { storeToRefs } from 'pinia' -import { - apiGetCpRanking, - apiGetCpRewardPool, -} from '@/api/couple.js' +import { apiGetCpRanking, apiGetCpRewardPool } from '@/api/couple.js' import TopUser from './components/topUser.vue' import itemCenter from '@/components/itemCenter.vue' import maskLayer from '@/components/MaskLayer.vue' @@ -272,7 +269,7 @@ const currentLangType = computed(() => { }) const isLoading = ref(true) // 预加载状态 -const imageUrl = (filename) => getPngUrl('Ranking/Couple/', filename) +const webpUrl = (filename) => getWebpUrl('Ranking/CoupleWebp/', filename) const getImgName = (filename) => { return currentLangType.value === 'ar' ? `${filename}_ar` : filename @@ -550,7 +547,7 @@ const getRankDigits = (rank) => { // 根据名次数字获取对应的数字图片 const getDigitImageUrl = (digit) => { if (/^[0-9]$/.test(digit)) { - return imageUrl(`num${digit}`) + return webpUrl(`num${digit}`) } return '' } @@ -605,10 +602,7 @@ const apiGetTop3Rewards = async () => { } const initData = async () => { - await Promise.all([ - apiGetRanking(), - apiGetTop3Rewards(), - ]) + await Promise.all([apiGetRanking(), apiGetTop3Rewards()]) } const preloadCriticalImages = async () => { @@ -739,5 +733,3 @@ onUnmounted(() => { right: 3vw; } - - diff --git a/src/views/Ranking/Couple/components/Barrage.vue b/src/views/Ranking/Couple/components/Barrage.vue index ae4f504..309530c 100644 --- a/src/views/Ranking/Couple/components/Barrage.vue +++ b/src/views/Ranking/Couple/components/Barrage.vue @@ -33,12 +33,7 @@ >
import { computed, onMounted, onUnmounted, ref, watch } from 'vue' import { useI18n } from 'vue-i18n' -import { getPngUrl } from '@/config/imagePaths.js' +import { getWebpUrl } from '@/config/imagePaths.js' import { handleAvatarImageError } from '@/utils/image/imageHandler.js' import { shouldUseLiteAnimations } from '@/utils/performanceMode.js' const { locale } = useI18n() -const imageUrl = (filename) => getPngUrl('Ranking/Couple/', filename) +const webpUrl = (filename) => getWebpUrl('Ranking/CoupleWebp/', filename) const props = defineProps({ barrageList: { @@ -135,7 +130,9 @@ const isBarragePaused = ref(false) const liteAnimations = shouldUseLiteAnimations() const visibleTracks = computed(() => tracks.value) // 低端机保留一定并发空间,避免长弹幕还没滑完就因为上限过低被后续弹幕挤掉。 -const effectiveMaxItems = computed(() => (liteAnimations ? Math.min(props.maxItems, 2) : props.maxItems)) +const effectiveMaxItems = computed(() => + liteAnimations ? Math.min(props.maxItems, 2) : props.maxItems, +) const effectiveLoopInterval = computed(() => liteAnimations ? Math.max(props.loopInterval, 6000) : props.loopInterval, ) diff --git a/src/views/Ranking/Couple/components/topUser.vue b/src/views/Ranking/Couple/components/topUser.vue index 0a35030..5ab849d 100644 --- a/src/views/Ranking/Couple/components/topUser.vue +++ b/src/views/Ranking/Couple/components/topUser.vue @@ -149,13 +149,13 @@ @@ -180,7 +180,7 @@
@@ -296,7 +296,7 @@ import { computed } from 'vue' import { useRoute, useRouter } from 'vue-router' import { useLangStore } from '@/stores/lang' import { useI18n } from 'vue-i18n' -import { getPngUrl } from '@/config/imagePaths.js' +import { getWebpUrl } from '@/config/imagePaths.js' import { setUserInfo } from '@/utils/userStore.js' import { viewUserInfo } from '@/utils/appBridge.js' import { connectToApp } from '@/utils/appConnector.js' @@ -323,7 +323,7 @@ const currentLangType = computed(() => { }) // 获取OSS图片URL的函数 -const imageUrl = (filename) => getPngUrl('Ranking/Couple/', filename) +const webpUrl = (filename) => getWebpUrl('Ranking/CoupleWebp/', filename) // 根据语言获取图片名 const getImgName = (filename) => { @@ -361,13 +361,13 @@ const rewardList = computed(() => { const BorderImgUrl = computed(() => { switch (props.ranking) { case '1': - return imageUrl('top1') + return webpUrl('top1') case '2': - return imageUrl('top2-3') + return webpUrl('top2-3') case '3': - return imageUrl('top2-3') + return webpUrl('top2-3') default: - return imageUrl('top2-3') + return webpUrl('top2-3') } }) diff --git a/src/views/Ranking/Couple/index.vue b/src/views/Ranking/Couple/index.vue index af66f74..aa75333 100644 --- a/src/views/Ranking/Couple/index.vue +++ b/src/views/Ranking/Couple/index.vue @@ -14,11 +14,11 @@ @@ -36,7 +36,7 @@ >
@@ -223,14 +223,14 @@ @@ -254,7 +254,7 @@ style="width: 100%" :flip="true" v-if="myRanking?.cpUserId" - :imgUrl="imageUrl('myRankingBg')" + :imgUrl="webpUrl('myRankingBg')" :contentStyle="`padding: 0 5%;justify-content: flex-start;`" > @@ -340,7 +340,7 @@
@@ -432,7 +432,7 @@ @click="selectCouple(couple.cpUserProfile)" > @@ -502,7 +502,7 @@ v-else style="display: flex; flex-direction: column; align-items: center; gap: 4vw" > - +

{{ t('no_couples') }}

@@ -695,7 +695,7 @@
@@ -1324,7 +1324,7 @@ import { computed, onMounted, onUnmounted, ref, watch } from 'vue' import { useRoute, useRouter } from 'vue-router' import { useLangStore } from '@/stores/lang' import { useI18n } from 'vue-i18n' -import { getPngUrl } from '@/config/imagePaths.js' +import { getWebpUrl } from '@/config/imagePaths.js' import { getUserId, setUserInfo } from '@/utils/userStore.js' import { viewUserInfo } from '@/utils/appBridge.js' import { connectToApp } from '@/utils/appConnector.js' @@ -1401,7 +1401,7 @@ const currentLangType = computed(() => { const isLoading = ref(true) // 预加载状态 // 获取OSS图片URL的函数 -const imageUrl = (filename) => getPngUrl('Ranking/Couple/', filename) +const webpUrl = (filename) => getWebpUrl('Ranking/CoupleWebp/', filename) // 根据语言获取图片名 const getImgName = (filename) => { @@ -1416,7 +1416,7 @@ const getRankDigits = (rank) => { // 获取数字图片URL const getDigitImageUrl = (digit) => { if (/^[0-9]$/.test(digit)) { - return imageUrl(`num${digit}`) // 假设数字图片在相同目录下 + return webpUrl(`num${digit}`) // 假设数字图片在相同目录下 } return '' } @@ -1467,84 +1467,84 @@ const twelveSigns = ref([ startMonthDay: '1.20', endMonthDay: '2.18', endYearOffset: 0, - bgUrl: imageUrl('AquariusCoupleFrame'), + bgUrl: webpUrl('AquariusCoupleFrame'), }, // 水瓶座 { name: 'Pisces', startMonthDay: '2.19', endMonthDay: '3.20', endYearOffset: 0, - bgUrl: imageUrl('PiscesCoupleFrame'), + bgUrl: webpUrl('PiscesCoupleFrame'), }, // 双鱼座 { name: 'Aries', startMonthDay: '3.21', endMonthDay: '4.19', endYearOffset: 0, - bgUrl: imageUrl('AriesCoupleFrame'), + bgUrl: webpUrl('AriesCoupleFrame'), }, // 白羊座 { name: 'Taurus', startMonthDay: '4.20', endMonthDay: '5.20', endYearOffset: 0, - bgUrl: imageUrl('TaurusCoupleFrame'), + bgUrl: webpUrl('TaurusCoupleFrame'), }, // 金牛座 { name: 'Gemini', startMonthDay: '5.21', endMonthDay: '6.21', endYearOffset: 0, - bgUrl: imageUrl(''), + bgUrl: webpUrl(''), }, // 双子座 { name: 'Cancer', startMonthDay: '6.22', endMonthDay: '7.22', endYearOffset: 0, - bgUrl: imageUrl(''), + bgUrl: webpUrl(''), }, // 巨蟹座 { name: 'Leo', startMonthDay: '7.23', endMonthDay: '8.22', endYearOffset: 0, - bgUrl: imageUrl(''), + bgUrl: webpUrl(''), }, // 狮子座 { name: 'Virgo', startMonthDay: '8.23', endMonthDay: '9.22', endYearOffset: 0, - bgUrl: imageUrl(''), + bgUrl: webpUrl(''), }, // 处女座 { name: 'Libra', startMonthDay: '9.23', endMonthDay: '10.22', endYearOffset: 0, - bgUrl: imageUrl(''), + bgUrl: webpUrl(''), }, // 天秤座 { name: 'Scorpio', startMonthDay: '10.23', endMonthDay: '11.21', endYearOffset: 0, - bgUrl: imageUrl(''), + bgUrl: webpUrl(''), }, // 天蝎座 { name: 'Sagittarius', startMonthDay: '11.22', endMonthDay: '12.21', endYearOffset: 0, - bgUrl: imageUrl(''), + bgUrl: webpUrl(''), }, // 射手座 { name: 'Capricorn', startMonthDay: '12.22', endMonthDay: '1.19', endYearOffset: 1, - bgUrl: imageUrl(''), + bgUrl: webpUrl(''), }, // 摩羯座 ]) // 十二星座 @@ -2019,65 +2019,65 @@ const initData = async () => { const preloadCriticalImages = async () => { const criticalImages = [ // 背景 - imageUrl('TaurusBg1New'), - imageUrl('TaurusBg2'), - imageUrl('TaurusBg3'), - imageUrl('TaurusBg4'), - imageUrl('TaurusBg5'), + webpUrl('TaurusBg1New'), + webpUrl('TaurusBg2'), + webpUrl('TaurusBg3'), + webpUrl('TaurusBg4'), + webpUrl('TaurusBg5'), // 弹幕 - imageUrl('TaurusCoupleSign'), + webpUrl('TaurusCoupleSign'), // 情书 - imageUrl(getImgName('letterBg')), + webpUrl(getImgName('letterBg')), // 历史榜首 - imageUrl(getImgName('historyTopBg')), - // imageUrl('topCoupleFrame'), - imageUrl('AquariusCoupleFrame'), - imageUrl('PiscesCoupleFrame'), + webpUrl(getImgName('historyTopBg')), + // webpUrl('topCoupleFrame'), + webpUrl('AquariusCoupleFrame'), + webpUrl('PiscesCoupleFrame'), // 按钮 - imageUrl(getImgName('rankingBtActive')), - imageUrl(getImgName('rankingBt')), - imageUrl(getImgName('gamePlayBtActive')), - imageUrl(getImgName('gamePlayBt')), - imageUrl(getImgName('rankingWeeklyBtActive')), - imageUrl(getImgName('rankingWeeklyBt')), - imageUrl(getImgName('rankingSeasonBtActive')), - imageUrl(getImgName('rankingSeasonBt')), - imageUrl(getImgName('gameLotteryBtActive')), - imageUrl(getImgName('gameLotteryBt')), - imageUrl(getImgName('gameSignInBtActive')), - imageUrl(getImgName('gameSignInBt')), - imageUrl(getImgName('gameExchangeBtActive')), - imageUrl(getImgName('gameExchangeBt')), + webpUrl(getImgName('rankingBtActive')), + webpUrl(getImgName('rankingBt')), + webpUrl(getImgName('gamePlayBtActive')), + webpUrl(getImgName('gamePlayBt')), + webpUrl(getImgName('rankingWeeklyBtActive')), + webpUrl(getImgName('rankingWeeklyBt')), + webpUrl(getImgName('rankingSeasonBtActive')), + webpUrl(getImgName('rankingSeasonBt')), + webpUrl(getImgName('gameLotteryBtActive')), + webpUrl(getImgName('gameLotteryBt')), + webpUrl(getImgName('gameSignInBtActive')), + webpUrl(getImgName('gameSignInBt')), + webpUrl(getImgName('gameExchangeBtActive')), + webpUrl(getImgName('gameExchangeBt')), // 排行榜 - imageUrl(`timeBg`), - imageUrl('helpBt'), - imageUrl(`top1`), - imageUrl(`top2-3`), - imageUrl(`top2RankingBg`), - imageUrl(`top2Frame`), - imageUrl(`top3RankingBg`), - imageUrl(`top3Frame`), - imageUrl(`rankingCoupleSign`), - imageUrl(`rankingItemBg`), - imageUrl('distribution'), - imageUrl(`num0`), - imageUrl(`num1`), - imageUrl(`num2`), - imageUrl(`num3`), - imageUrl(`num4`), - imageUrl(`num5`), - imageUrl(`num6`), - imageUrl(`num7`), - imageUrl(`num8`), - imageUrl(`num9`), - imageUrl('myRankingBg'), - imageUrl('distribution'), - imageUrl(getImgName('lastLetterBg')), + webpUrl(`timeBg`), + webpUrl('helpBt'), + webpUrl(`top1`), + webpUrl(`top2-3`), + webpUrl(`top2RankingBg`), + webpUrl(`top2Frame`), + webpUrl(`top3RankingBg`), + webpUrl(`top3Frame`), + webpUrl(`rankingCoupleSign`), + webpUrl(`rankingItemBg`), + webpUrl('distribution'), + webpUrl(`num0`), + webpUrl(`num1`), + webpUrl(`num2`), + webpUrl(`num3`), + webpUrl(`num4`), + webpUrl(`num5`), + webpUrl(`num6`), + webpUrl(`num7`), + webpUrl(`num8`), + webpUrl(`num9`), + webpUrl('myRankingBg'), + webpUrl('distribution'), + webpUrl(getImgName('lastLetterBg')), ] await preloadImages(criticalImages) diff --git a/src/views/Ranking/GamesKing/index.vue b/src/views/Ranking/GamesKing/index.vue index 03bd361..e01d9b7 100644 --- a/src/views/Ranking/GamesKing/index.vue +++ b/src/views/Ranking/GamesKing/index.vue @@ -11,19 +11,19 @@
@@ -36,7 +36,7 @@
- +
{{ Days }}D
- +
{{ Hours }}
:
- +
{{ Minutes }}
:
- +
{{ Second }}
@@ -91,7 +91,7 @@
1 && historyTopIndex > 0" - :src="imageUrl('topBackBt')" + :src="webpUrl('topBackBt')" alt="" class="flipImg" style="display: block; width: 100%; object-fit: cover" @@ -179,7 +179,7 @@ @@ -247,7 +247,7 @@
@@ -286,7 +286,7 @@
@@ -330,7 +330,7 @@ v-for="topUser in RankingHasTop10.slice(4, 7)" :key="topUser.userId" ranking="5-7" - :BorderImgUrl="imageUrl('top5_7')" + :BorderImgUrl="webpUrl('top5_7')" :avatarUrl="topUser.avatar" :name="topUser.nickname" :distributionValue="topUser.quantity || ''" @@ -345,7 +345,7 @@ v-for="topUser in RankingHasTop10.slice(7, 10)" :key="topUser.userId" ranking="8-10" - :BorderImgUrl="imageUrl('top8_10')" + :BorderImgUrl="webpUrl('top8_10')" :avatarUrl="topUser.avatar" :name="topUser.nickname" :distributionValue="topUser.quantity || ''" @@ -361,7 +361,7 @@ style="min-height: 26.4vw" v-for="(listItem, index) in showRanking" :key="listItem.userId" - :imgUrl="imageUrl('RankingItem')" + :imgUrl="webpUrl('RankingItem')" :contentStyle="`padding: 0 10%`" :lazy="true" :immediate="index < 2" @@ -455,7 +455,7 @@ @@ -520,7 +520,7 @@ style="min-height: 26.4vw" v-for="(listItem, index) in showRankingDaily" :key="listItem.userId" - :imgUrl="imageUrl('RankingItem')" + :imgUrl="webpUrl('RankingItem')" :contentStyle="`padding: 0 10%`" :lazy="true" :immediate="index < 2" @@ -614,7 +614,7 @@ @@ -827,7 +827,7 @@ @@ -918,12 +918,12 @@
@@ -934,7 +934,7 @@
@@ -958,7 +958,7 @@ > @@ -1009,8 +1009,8 @@ const currentLangType = computed(() => { }) // 获取OSS图片URL的函数 -const imageUrl = (filename) => getPngUrl('Ranking/GamesKing/', filename) -const webpUrl = (filename) => getWebpUrl('Ranking/GamesKing/', filename) +const imageUrl = (filename) => getPngUrl('Ranking/GamesKingWebp/', filename) +const webpUrl = (filename) => getWebpUrl('Ranking/GamesKingWebp/', filename) // 根据语言获取图片名 const getImgName = (filename) => { @@ -1133,10 +1133,10 @@ const changeRanking = (type) => { } const topImg = ref([ - imageUrl('top1RewardBg_20260515'), - imageUrl('top2_4RewardBg'), - imageUrl('top5_7RewardBg'), - imageUrl('top8_10RewardBg'), + webpUrl('top1RewardBg_20260515'), + webpUrl('top2_4RewardBg'), + webpUrl('top5_7RewardBg'), + webpUrl('top8_10RewardBg'), ]) // top奖励背景 // 处理周榜小于10人时的情况 @@ -1308,36 +1308,36 @@ const initData = async () => { // 预加载关键图片 const preloadCriticalImages = async () => { const criticalImages = [ - imageUrl('bg'), - imageUrl('bg2'), - imageUrl('closeBt'), - imageUrl(getImgName('dailyPopUpNew')), - imageUrl('helpBt'), - imageUrl(getImgName('helpInfo')), - imageUrl(getImgName('historyBtActive')), - imageUrl('myRankingBg'), - imageUrl(getImgName('rankingBtActive')), - imageUrl(getImgName('rewardBtActive')), + webpUrl('bg'), + webpUrl('bg2'), + webpUrl('closeBt'), + webpUrl(getImgName('dailyPopUpNew')), + webpUrl('helpBt'), + webpUrl(getImgName('helpInfo')), + webpUrl(getImgName('historyBtActive')), + webpUrl('myRankingBg'), + webpUrl(getImgName('rankingBtActive')), + webpUrl(getImgName('rewardBtActive')), - imageUrl('RankingBottomBorder'), - imageUrl('RankingCenterBg'), - imageUrl('RankingItem'), - imageUrl(getImgName('RankingMain')), + webpUrl('RankingBottomBorder'), + webpUrl('RankingCenterBg'), + webpUrl('RankingItem'), + webpUrl(getImgName('RankingMain')), - imageUrl('BtBg'), - imageUrl('top1RewardDaily'), - imageUrl('top2RewardDaily'), - imageUrl('top3RewardDaily'), - imageUrl('timeBg'), - imageUrl('topBackBt'), - imageUrl('topNextBt'), - imageUrl('top1'), - imageUrl('top2'), - imageUrl('top3'), - imageUrl('top4'), - imageUrl('top5_7'), - imageUrl('top8_10'), - imageUrl('top1-3FrameDaily'), + webpUrl('BtBg'), + webpUrl('top1RewardDaily'), + webpUrl('top2RewardDaily'), + webpUrl('top3RewardDaily'), + webpUrl('timeBg'), + webpUrl('topBackBt'), + webpUrl('topNextBt'), + webpUrl('top1'), + webpUrl('top2'), + webpUrl('top3'), + webpUrl('top4'), + webpUrl('top5_7'), + webpUrl('top8_10'), + webpUrl('top1-3FrameDaily'), ] await preloadImages(criticalImages) @@ -1359,13 +1359,13 @@ const completePreloading = async () => { // 预加载其他图片 const preloadOtherImages = async () => { const criticalImages = [ - imageUrl(getImgName('historyTopBg')), - imageUrl('historyTopFrame'), - imageUrl(getImgName('specialRewardsNew')), - imageUrl('top1RewardBg_20260515'), - imageUrl('top2_4RewardBg'), - imageUrl('top5_7RewardBg'), - imageUrl('top8_10RewardBg'), + webpUrl(getImgName('historyTopBg')), + webpUrl('historyTopFrame'), + webpUrl(getImgName('specialRewards_20260518')), + webpUrl('top1RewardBg_20260515'), + webpUrl('top2_4RewardBg'), + webpUrl('top5_7RewardBg'), + webpUrl('top8_10RewardBg'), ] await preloadImagesIdle(criticalImages) diff --git a/src/views/Ranking/KingAndQueen/TopList.vue b/src/views/Ranking/KingAndQueen/TopList.vue index 5cd5a61..8382c12 100644 --- a/src/views/Ranking/KingAndQueen/TopList.vue +++ b/src/views/Ranking/KingAndQueen/TopList.vue @@ -9,7 +9,7 @@
- +
@@ -18,7 +18,7 @@ @@ -120,12 +120,12 @@
- +
{{ Days }}D
- +
{{ Hours }} : {{ Minutes }} : {{ Second }}
@@ -134,7 +134,7 @@
- +
- +
@@ -185,10 +185,10 @@ v-show="visibleKingList" style="width: 100%; display: flex; justify-content: space-around" > - + - +
@@ -214,7 +214,7 @@
@@ -369,7 +369,7 @@ margin: -10px 0; padding: 10px 10%; " - :style="{ backgroundImage: toCssBackgroundImage(imageUrl('border-item')) }" + :style="{ backgroundImage: toCssBackgroundImage(webpUrl('border-item')) }" >
@@ -536,10 +536,10 @@ v-show="visibleKingRewards" style="width: 100%; display: flex; justify-content: space-around" > - + - +
@@ -586,7 +586,7 @@ :key="rewardIndex" style="width: 100%" > - + @@ -780,7 +780,7 @@ import { viewUserInfo } from '@/utils/appBridge.js' import { useLangStore } from '@/stores/lang' import { useThrottle } from '@/utils/useDebounce' import { connectToApp } from '@/utils/appConnector.js' -import { getPngUrl } from '@/config/imagePaths.js' +import { getWebpUrl } from '@/config/imagePaths.js' import { preloadImages } from '@/utils/image/imagePreloader.js' import { toCssBackgroundImage } from '@/utils/protectedAssets.js' import { handleAvatarImageError, handleRewardImageError } from '@/utils/image/imageHandler.js' @@ -808,7 +808,7 @@ const currentLangType = computed(() => { const isLoading = ref(true) // 获取OSS图片URL的函数 -const imageUrl = (filename) => getPngUrl('Ranking/KingQueen/', filename) +const webpUrl = (filename) => getWebpUrl('Ranking/KingQueenWebp/', filename) // 根据语言获取图片名 const getImgName = (filename) => { return currentLangType.value === 'ar' ? `${filename}_ar` : filename @@ -832,13 +832,13 @@ const showTopOne = computed(() => { if (historyList.value[historyIndex.value]?.wealth) topNew.push({ type: 'topKing', - Frame: imageUrl('kingFrame'), + Frame: webpUrl('kingFrame'), userInfo: historyList.value[historyIndex.value].wealth || {}, }) if (historyList.value[historyIndex.value]?.charm) { topNew.push({ type: 'topQueen', - Frame: imageUrl('queenFrame'), + Frame: webpUrl('queenFrame'), userInfo: historyList.value[historyIndex.value].charm || {}, }) } @@ -880,12 +880,12 @@ const queenList = ref([]) // 女王榜 const listTop = ref([ { type: 'topKing', - Frame: imageUrl('kingFrame'), + Frame: webpUrl('kingFrame'), userInfo: {}, }, { type: 'topQueen', - Frame: imageUrl('queenFrame'), + Frame: webpUrl('queenFrame'), userInfo: {}, }, ]) //本周的top1国王和女王 @@ -898,7 +898,7 @@ const topList = computed(() => { const showKingLoading = ref(true) //触底加载功能 const showQueenLoading = ref(true) //触底加载功能 -const topImg = ref([imageUrl('top1'), imageUrl('top2'), imageUrl('top3')]) // top图片 +const topImg = ref([webpUrl('top1'), webpUrl('top2'), webpUrl('top3')]) // top图片 const visibleKingRewards = ref(true) // 展示奖励榜标签 const kingRewards = ref([]) //国王奖励列表 @@ -1114,31 +1114,31 @@ const updatePageData = async () => { // 预加载关键图片 const preloadCriticalImages = async () => { const criticalImages = [ - imageUrl('bg'), - imageUrl('border-item'), - imageUrl('border-item-user'), - imageUrl('help'), - imageUrl('history'), - imageUrl('listTitle'), - imageUrl('dayBg'), - imageUrl('timeBg'), - imageUrl('rewards'), - imageUrl('eventGifts'), - imageUrl('gift'), - imageUrl('kingBtActive'), - imageUrl('queenBt'), - imageUrl('kingBt'), - imageUrl('queenBtActive'), - imageUrl(getImgName('helpInfo')), - imageUrl('timeBack'), - imageUrl('timeNext'), - imageUrl('cancel'), - imageUrl('myRankingBg'), - imageUrl('kingFrame'), - imageUrl('queenFrame'), - imageUrl('top1'), - imageUrl('top2'), - imageUrl('top3'), + webpUrl('bg'), + webpUrl('border-item'), + webpUrl('border-item-user'), + webpUrl('help'), + webpUrl('history'), + webpUrl('listTitle'), + webpUrl('dayBg'), + webpUrl('timeBg'), + webpUrl('rewards'), + webpUrl('eventGifts'), + webpUrl('gift'), + webpUrl('kingBtActive'), + webpUrl('queenBt'), + webpUrl('kingBt'), + webpUrl('queenBtActive'), + webpUrl(getImgName('helpInfo')), + webpUrl('timeBack'), + webpUrl('timeNext'), + webpUrl('cancel'), + webpUrl('myRankingBg'), + webpUrl('kingFrame'), + webpUrl('queenFrame'), + webpUrl('top1'), + webpUrl('top2'), + webpUrl('top3'), ] await preloadImages(criticalImages) diff --git a/src/views/Ranking/KingAndQueen/components/borderImg.vue b/src/views/Ranking/KingAndQueen/components/borderImg.vue index c90ff19..31fad41 100644 --- a/src/views/Ranking/KingAndQueen/components/borderImg.vue +++ b/src/views/Ranking/KingAndQueen/components/borderImg.vue @@ -43,11 +43,11 @@