feat(BD&BDLeader政策页): 新增南亚区政策图
This commit is contained in:
parent
66c78a3ea9
commit
efa16a8869
@ -6,14 +6,21 @@
|
|||||||
color="black"
|
color="black"
|
||||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||||
/>
|
/>
|
||||||
<img
|
<div v-if="userRegion">
|
||||||
v-smart-img
|
<div v-if="userRegion.regionCode == 'SA'">
|
||||||
v-if="from === 'BDLead'"
|
<img v-smart-img :src="imageUrl('SA_Policy')" alt="Policy Image" class="policy-image" />
|
||||||
:src="bdLeaderImgUrl"
|
</div>
|
||||||
alt="bdleader Policy Image"
|
<div v-else>
|
||||||
class="policy-image"
|
<img
|
||||||
/>
|
v-smart-img
|
||||||
<img v-smart-img :src="bdImgUrl" alt="bd Policy Image" class="policy-image" />
|
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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -23,6 +30,9 @@ import { useRoute } from 'vue-router'
|
|||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { useLangStore } from '@/stores/lang'
|
import { useLangStore } from '@/stores/lang'
|
||||||
import { getPngUrl } from '@/config/imagePaths.js'
|
import { getPngUrl } from '@/config/imagePaths.js'
|
||||||
|
import { getUserId } from '@/utils/userStore.js'
|
||||||
|
|
||||||
|
import { getRegionByUserId } from '@/api/wallet.js'
|
||||||
|
|
||||||
import GeneralHeader from '@/components/GeneralHeader.vue'
|
import GeneralHeader from '@/components/GeneralHeader.vue'
|
||||||
|
|
||||||
@ -43,26 +53,30 @@ const getImgName = (filename) => {
|
|||||||
return currentLangType.value === 'ar' ? `${filename}_ar` : filename
|
return currentLangType.value === 'ar' ? `${filename}_ar` : filename
|
||||||
}
|
}
|
||||||
|
|
||||||
const from = ref('')
|
const from = ref('') // 上一个页面
|
||||||
|
const title = ref('') // 页面标题
|
||||||
const title = ref('')
|
const userRegion = ref(null) // 区域代码
|
||||||
const bdImgUrl = ref('') //bd政策图
|
|
||||||
const bdLeaderImgUrl = ref('') //bdleader政策图
|
|
||||||
|
|
||||||
const updateImages = () => {
|
const updateImages = () => {
|
||||||
from.value = route.query.from || 'BDLead'
|
from.value = route.query.from || 'BDLead'
|
||||||
|
|
||||||
if (from.value === 'BD') {
|
if (from.value === 'BD') {
|
||||||
title.value = t('bd_policy')
|
title.value = t('bd_policy')
|
||||||
bdImgUrl.value = imageUrl('BDPolicy')
|
|
||||||
} else if (from.value === 'BDLead') {
|
} else if (from.value === 'BDLead') {
|
||||||
title.value = t('bd_leader_policy')
|
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(() => {
|
onMounted(() => {
|
||||||
|
apiGetRegionByUserId()
|
||||||
updateImages()
|
updateImages()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user