From efa16a8869963067c78ea2ddf796c12dcd7e7e74 Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Fri, 3 Apr 2026 15:36:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(BD&BDLeader=E6=94=BF=E7=AD=96=E9=A1=B5):?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E5=8D=97=E4=BA=9A=E5=8C=BA=E6=94=BF?= =?UTF-8?q?=E7=AD=96=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/BDCenter/policy.vue | 46 +++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 16 deletions(-) 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" /> - bdleader Policy Image - bd Policy Image +
+
+ Policy Image +
+
+ bdleader Policy Image + bd Policy Image +
+
@@ -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() })