feat(BD&BDLeader政策页): 新增南亚区政策图
This commit is contained in:
parent
66c78a3ea9
commit
efa16a8869
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user