feat(游戏王): 取消展示图的区域区分,阿语和非阿语区都展示同一个奖励图
This commit is contained in:
parent
5e8bbba6e6
commit
0b033d0e6d
@ -981,7 +981,6 @@ import { computed, onMounted, onUnmounted, ref } from 'vue'
|
|||||||
import { closePage, viewUserInfo } from '@/utils/appBridge.js'
|
import { closePage, viewUserInfo } from '@/utils/appBridge.js'
|
||||||
import { connectToApp } from '@/utils/appConnector.js'
|
import { connectToApp } from '@/utils/appConnector.js'
|
||||||
import { useLangStore } from '@/stores/lang'
|
import { useLangStore } from '@/stores/lang'
|
||||||
import { getUserId } from '@/utils/userStore.js'
|
|
||||||
import { getPngUrl, getWebpUrl } from '@/config/imagePaths.js'
|
import { getPngUrl, getWebpUrl } from '@/config/imagePaths.js'
|
||||||
import { preloadImages, preloadImagesIdle } from '@/utils/image/imagePreloader.js'
|
import { preloadImages, preloadImagesIdle } from '@/utils/image/imagePreloader.js'
|
||||||
import { handleAvatarImageError, handleRewardImageError } from '@/utils/image/imageHandler.js'
|
import { handleAvatarImageError, handleRewardImageError } from '@/utils/image/imageHandler.js'
|
||||||
@ -994,7 +993,6 @@ import {
|
|||||||
getRankingListAndMyRanking, // 获取排行榜和我的排名
|
getRankingListAndMyRanking, // 获取排行榜和我的排名
|
||||||
getHistoryTopOne, // 获取历史榜首
|
getHistoryTopOne, // 获取历史榜首
|
||||||
} from '@/api/activity.js'
|
} from '@/api/activity.js'
|
||||||
import { getRegionByUserId } from '@/api/wallet.js'
|
|
||||||
|
|
||||||
import BackgroundLayer from '@/components/BackgroundLayer.vue'
|
import BackgroundLayer from '@/components/BackgroundLayer.vue'
|
||||||
import itemCenter from '@/components/itemCenter.vue'
|
import itemCenter from '@/components/itemCenter.vue'
|
||||||
@ -1024,18 +1022,11 @@ const getImgName = (filename) => {
|
|||||||
return currentLangType.value === 'ar' ? `${filename}_ar` : filename
|
return currentLangType.value === 'ar' ? `${filename}_ar` : filename
|
||||||
}
|
}
|
||||||
|
|
||||||
const userRegion = ref(null)
|
|
||||||
const isNotArabicUserRegion = computed(() => {
|
|
||||||
return Boolean(userRegion.value?.regionCode && userRegion.value.regionCode !== 'AR')
|
|
||||||
})
|
|
||||||
const getRegionImgName = (defaultFilename, notArabicFilename) => {
|
|
||||||
return getImgName(isNotArabicUserRegion.value ? notArabicFilename : defaultFilename)
|
|
||||||
}
|
|
||||||
const dailyPopUpImageName = computed(() => {
|
const dailyPopUpImageName = computed(() => {
|
||||||
return getRegionImgName('dailyPopUp_20260520', 'dailyPopUp_NOT_AR_20260529')
|
return getImgName('dailyPopUp_20260602')
|
||||||
})
|
})
|
||||||
const specialRewardsImageName = computed(() => {
|
const specialRewardsImageName = computed(() => {
|
||||||
return getRegionImgName('specialRewards_20260520', 'specialRewards_NOT_AR_20260529')
|
return getImgName('specialRewards_20260602')
|
||||||
})
|
})
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -1111,24 +1102,6 @@ const checkShow = () => {
|
|||||||
|
|
||||||
// 倒计时
|
// 倒计时
|
||||||
const Days = ref(0)
|
const Days = ref(0)
|
||||||
// 获取用户所在的区域信息
|
|
||||||
const apiGetRegionByUserId = async () => {
|
|
||||||
try {
|
|
||||||
const userId = getUserId()
|
|
||||||
if (!userId) {
|
|
||||||
console.warn('用户ID为空,跳过用户区域获取')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const response = await getRegionByUserId(userId)
|
|
||||||
if (response.status) {
|
|
||||||
userRegion.value = response.body
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('获取用户区域失败:', error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const Hours = ref(0)
|
const Hours = ref(0)
|
||||||
const Minutes = ref(0)
|
const Minutes = ref(0)
|
||||||
const Second = ref(0)
|
const Second = ref(0)
|
||||||
@ -1430,7 +1403,6 @@ const preloadOtherImages = async () => {
|
|||||||
// 使用工具函数连接APP
|
// 使用工具函数连接APP
|
||||||
const connectToAppHandler = async () => {
|
const connectToAppHandler = async () => {
|
||||||
await connectToApp(async () => {
|
await connectToApp(async () => {
|
||||||
await apiGetRegionByUserId()
|
|
||||||
await completePreloading()
|
await completePreloading()
|
||||||
preloadOtherImages()
|
preloadOtherImages()
|
||||||
checkShow()
|
checkShow()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user