From 3134addef1a81e2c750354d9a0d26855a2cc8ebe Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Fri, 31 Oct 2025 22:09:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BD=BF=E7=94=A8=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E5=A4=B4=E9=83=A8=E7=BB=84=E4=BB=B6=EF=BC=8C=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E5=88=87=E6=8D=A2=E5=8A=9F=E8=83=BD=E5=B9=B6?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/ar.json | 4 +++- src/locales/en.json | 4 +++- src/locales/zh.json | 4 +++- src/views/BDLeaderCenter/index.vue | 34 +++++++----------------------- 4 files changed, 17 insertions(+), 29 deletions(-) diff --git a/src/locales/ar.json b/src/locales/ar.json index b19d0b1..7888825 100644 --- a/src/locales/ar.json +++ b/src/locales/ar.json @@ -228,5 +228,7 @@ "unsupported_file_type": "نوع الملف غير مدعوم", "max_images_warning": "يمكنك تحميل 3 صور كحد أقصى", "upload_failed": "فشل التحميل", - "please_enter_contact_number": "يرجى إدخال رقم الاتصال" + "please_enter_contact_number": "يرجى إدخال رقم الاتصال", + + "invite_user_to_become_bd": "دعوة المستخدم ليصبح BD" } diff --git a/src/locales/en.json b/src/locales/en.json index 49370d3..d7a8ac0 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -228,5 +228,7 @@ "unsupported_file_type": "Unsupported file type", "max_images_warning": "You can upload up to 3 pictures at most", "upload_failed": "Upload failed", - "please_enter_contact_number": "Please enter contact number" + "please_enter_contact_number": "Please enter contact number", + + "invite_user_to_become_bd": "Invite User To Become BD" } diff --git a/src/locales/zh.json b/src/locales/zh.json index 7ac389a..345b962 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -228,5 +228,7 @@ "unsupported_file_type": "不支持的文件类型", "max_images_warning": "最多只能上传3张图片", "upload_failed": "上传失败", - "please_enter_contact_number": "请输入联系电话" + "please_enter_contact_number": "请输入联系电话", + + "invite_user_to_become_bd": "邀请用户成为BD" } diff --git a/src/views/BDLeaderCenter/index.vue b/src/views/BDLeaderCenter/index.vue index 9425507..4ee5198 100644 --- a/src/views/BDLeaderCenter/index.vue +++ b/src/views/BDLeaderCenter/index.vue @@ -66,10 +66,10 @@

- {{ userInfo.userNickname || userInfo.name || 'User1' }} + {{ userInfo.userNickname || userInfo.name }}

- ID: {{ userInfo.id || userInfo.account || '1234567890' }} + ID: {{ userInfo.id || userInfo.account }}

@@ -129,7 +129,7 @@ >
- {{ t('invite') }} User To Become BD
@@ -729,20 +729,11 @@ const maskLayerShow = computed(() => { return showHistory.value || showMore.value }) -// 用户信息 -const userInfo = ref({ - userNickname: 'User1', - id: '1234567890', - userAvatar: '', -}) - const records = (historyType) => { showHistory.value = true currentHistoryType.value = historyType } -const appConnected = ref(true) - // 切换标签页 const switchTab = (tabId) => { activeTab.value = tabId @@ -807,16 +798,6 @@ const goToInviteBD = () => { router.push('/invite-bd') } -// 图片错误处理 -const handleImageError = (e) => { - e.target.style.display = 'none' -} - -// 获取头像占位符 -const getAvatarPlaceholder = () => { - return userInfo.value.userNickname ? userInfo.value.userNickname.charAt(0).toUpperCase() : 'U' -} - // 查询BD成员账单列表 const apiGetBdMemberBillList = async () => { const res = await getBdMemberBillList('BD') @@ -857,10 +838,11 @@ const apiGetBdLeaderHistory = async () => { } } -const { salaryInfo } = usePageInitializationWithConfig('BD_LEADER_CENTER', { - needsTeamInfo: true, - onDataLoaded: () => {}, -}) +const { appConnected, userInfo, salaryInfo, handleImageError, getAvatarPlaceholder } = + usePageInitializationWithConfig('BD_LEADER_CENTER', { + needsTeamInfo: true, + onDataLoaded: () => {}, + }) // 初始化数据 const initData = () => {