diff --git a/src/views/BDCenter/policy.vue b/src/views/BDCenter/policy.vue
index 08003bd..d0c8959 100644
--- a/src/views/BDCenter/policy.vue
+++ b/src/views/BDCenter/policy.vue
@@ -6,14 +6,21 @@
color="black"
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
/>
-
-
+
@@ -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()
})