From 18b53e627a6c94bd57beb3d7e33c84adc65e5a4f Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Wed, 10 Dec 2025 16:50:58 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=B8=B8=E6=88=8F=E6=B4=BB=E5=8A=A8):=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=80=92=E8=AE=A1=E6=97=B6=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E4=BD=BF=E7=94=A8=E6=8C=89=E9=9C=80=E9=A2=84?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=92=8C=E5=8A=A0=E8=BD=BD=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Activities/Game/index.vue | 125 ++++++++++++---------------- 1 file changed, 52 insertions(+), 73 deletions(-) diff --git a/src/views/Activities/Game/index.vue b/src/views/Activities/Game/index.vue index aa0e59f..ff3280c 100644 --- a/src/views/Activities/Game/index.vue +++ b/src/views/Activities/Game/index.vue @@ -18,7 +18,7 @@ -
+
{{ Days }}D
@@ -46,15 +46,12 @@
-
+
-
-
- - -
- -
- - -
- - -
- -
- @@ -464,18 +407,22 @@ import itemCenter from '@/components/itemCenter.vue' import TopUser from './components/topUser.vue' import maskLayer from '@/components/MaskLayer.vue' -// 获取OSS图片URL的函数 -const imageUrl = (filename) => getPngUrl('Activities/Game/', filename) - -const isInAppEnvironment = ref(false) // 检测是否在APP环境中 -const maskLayerShow = ref(false) //帮助模块 - const langStore = useLangStore() // 当前语言类型 const currentLangType = computed(() => { return langStore.selectedLang?.type || 'en' }) +// 获取OSS图片URL的函数 +const imageUrl = (filename) => getPngUrl('Activities/Game/', filename) +// 根据语言获取图片名 +const getImgName = (filename) => { + return currentLangType.value === 'ar' ? `${filename}Ar` : filename +} + +const isInAppEnvironment = ref(false) // 检测是否在APP环境中 +const maskLayerShow = ref(false) //帮助模块 + // 倒计时 const Days = ref(0) const Hours = ref(0) @@ -619,11 +566,29 @@ const preloadCriticalImages = () => { imageUrl('timeBg'), imageUrl('rankingBt'), imageUrl('rankingBtActive'), + imageUrl('rewardBtActive'), + imageUrl('rewardsBt'), + imageUrl('RankingMain'), + imageUrl('topOne'), + imageUrl('topTwo'), + imageUrl('topThree'), + imageUrl('RankingItem'), + imageUrl('RankingBottomBorder'), + imageUrl('myRankingBg'), + imageUrl('helpInfo'), + imageUrl('helpInfoAr'), + imageUrl('top1RewardBg'), + imageUrl('top2RewardBg'), + imageUrl('top3RewardBg'), + imageUrl('giftItemBg'), + ] + + const criticalImages_ar = [ + imageUrl('bg'), + imageUrl('timeBg'), imageUrl('rankingBtAr'), imageUrl('rankingBtActiveAr'), - imageUrl('rewardBtActive'), imageUrl('rewardBtActiveAr'), - imageUrl('rewardsBt'), imageUrl('rewardsBtAr'), imageUrl('RankingMain'), imageUrl('topOne'), @@ -640,7 +605,11 @@ const preloadCriticalImages = () => { imageUrl('giftItemBg'), ] - preloadImages(criticalImages) + if (currentLangType.value == 'en') { + preloadImages(criticalImages) + } else if (currentLangType.value == 'ar') { + preloadImages(criticalImages_ar) + } } // 使用工具函数连接APP @@ -732,6 +701,12 @@ onUnmounted(() => { font-size: 0.8em; } +.timeBox { + display: flex; + justify-content: center; + margin-top: 15vw; +} + @media screen and (max-width: 360px) { * { font-size: 10px; @@ -755,4 +730,8 @@ onUnmounted(() => { font-size: 32px; } } + +[dir='rtl'] .timeBox { + flex-direction: row-reverse; +}