![]()
-
![]()
@@ -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;
+}