feat(BD&BDLeader政策页): 新增南亚区政策图

This commit is contained in:
hzj 2026-04-03 15:36:24 +08:00
parent 66c78a3ea9
commit efa16a8869

View File

@ -6,14 +6,21 @@
color="black"
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
/>
<img
v-smart-img
v-if="from === 'BDLead'"
:src="bdLeaderImgUrl"
alt="bdleader Policy Image"
class="policy-image"
/>
<img v-smart-img :src="bdImgUrl" alt="bd Policy Image" class="policy-image" />
<div v-if="userRegion">
<div v-if="userRegion.regionCode == 'SA'">
<img v-smart-img :src="imageUrl('SA_Policy')" alt="Policy Image" class="policy-image" />
</div>
<div v-else>
<img
v-smart-img
v-if="from === 'BDLead'"
:src="imageUrl('BDLeaderPolicy')"
alt="bdleader Policy Image"
class="policy-image"
/>
<img v-smart-img :src="imageUrl('BDPolicy')" alt="bd Policy Image" class="policy-image" />
</div>
</div>
</div>
</template>
@ -23,6 +30,9 @@ import { useRoute } from 'vue-router'
import { useI18n } from 'vue-i18n'
import { useLangStore } from '@/stores/lang'
import { getPngUrl } from '@/config/imagePaths.js'
import { getUserId } from '@/utils/userStore.js'
import { getRegionByUserId } from '@/api/wallet.js'
import GeneralHeader from '@/components/GeneralHeader.vue'
@ -43,26 +53,30 @@ const getImgName = (filename) => {
return currentLangType.value === 'ar' ? `${filename}_ar` : filename
}
const from = ref('')
const title = ref('')
const bdImgUrl = ref('') //bd
const bdLeaderImgUrl = ref('') //bdleader
const from = ref('') //
const title = ref('') //
const userRegion = ref(null) //
const updateImages = () => {
from.value = route.query.from || 'BDLead'
if (from.value === 'BD') {
title.value = t('bd_policy')
bdImgUrl.value = imageUrl('BDPolicy')
} else if (from.value === 'BDLead') {
title.value = t('bd_leader_policy')
bdImgUrl.value = imageUrl('BDPolicy')
bdLeaderImgUrl.value = imageUrl('BDLeaderPolicy')
}
}
//
const apiGetRegionByUserId = async () => {
const response = await getRegionByUserId(getUserId())
if (response.status) {
userRegion.value = response.body
}
}
onMounted(() => {
apiGetRegionByUserId()
updateImages()
})
</script>