feat: 使用新的头部组件,对接语言切换功能并调整布局

This commit is contained in:
hzj 2025-10-31 22:09:05 +08:00
parent cd87edd2fd
commit 3134addef1
4 changed files with 17 additions and 29 deletions

View File

@ -228,5 +228,7 @@
"unsupported_file_type": "نوع الملف غير مدعوم", "unsupported_file_type": "نوع الملف غير مدعوم",
"max_images_warning": "يمكنك تحميل 3 صور كحد أقصى", "max_images_warning": "يمكنك تحميل 3 صور كحد أقصى",
"upload_failed": "فشل التحميل", "upload_failed": "فشل التحميل",
"please_enter_contact_number": "يرجى إدخال رقم الاتصال" "please_enter_contact_number": "يرجى إدخال رقم الاتصال",
"invite_user_to_become_bd": "دعوة المستخدم ليصبح BD"
} }

View File

@ -228,5 +228,7 @@
"unsupported_file_type": "Unsupported file type", "unsupported_file_type": "Unsupported file type",
"max_images_warning": "You can upload up to 3 pictures at most", "max_images_warning": "You can upload up to 3 pictures at most",
"upload_failed": "Upload failed", "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"
} }

View File

@ -228,5 +228,7 @@
"unsupported_file_type": "不支持的文件类型", "unsupported_file_type": "不支持的文件类型",
"max_images_warning": "最多只能上传3张图片", "max_images_warning": "最多只能上传3张图片",
"upload_failed": "上传失败", "upload_failed": "上传失败",
"please_enter_contact_number": "请输入联系电话" "please_enter_contact_number": "请输入联系电话",
"invite_user_to_become_bd": "邀请用户成为BD"
} }

View File

@ -66,10 +66,10 @@
</div> </div>
<div style="flex: 1"> <div style="flex: 1">
<h3 style="margin: 0 0 4px 0; font-weight: 600; color: #333"> <h3 style="margin: 0 0 4px 0; font-weight: 600; color: #333">
{{ userInfo.userNickname || userInfo.name || 'User1' }} {{ userInfo.userNickname || userInfo.name }}
</h3> </h3>
<p style="margin: 0; font-size: 0.9em; color: #666"> <p style="margin: 0; font-size: 0.9em; color: #666">
ID: {{ userInfo.id || userInfo.account || '1234567890' }} ID: {{ userInfo.id || userInfo.account }}
</p> </p>
</div> </div>
<div style="display: flex; align-items: center" @click="gotoPolicy"> <div style="display: flex; align-items: center" @click="gotoPolicy">
@ -129,7 +129,7 @@
> >
<div style="display: flex; justify-content: space-between; align-items: center"> <div style="display: flex; justify-content: space-between; align-items: center">
<span style="font-weight: 600; color: #1f2937"> <span style="font-weight: 600; color: #1f2937">
{{ t('invite') }} User To Become BD</span {{ t('invite_user_to_become_bd') }}</span
> >
<img src="../../assets/icon/arrow.png" alt="" style="display: block; width: 20px" /> <img src="../../assets/icon/arrow.png" alt="" style="display: block; width: 20px" />
</div> </div>
@ -729,20 +729,11 @@ const maskLayerShow = computed(() => {
return showHistory.value || showMore.value return showHistory.value || showMore.value
}) })
//
const userInfo = ref({
userNickname: 'User1',
id: '1234567890',
userAvatar: '',
})
const records = (historyType) => { const records = (historyType) => {
showHistory.value = true showHistory.value = true
currentHistoryType.value = historyType currentHistoryType.value = historyType
} }
const appConnected = ref(true)
// //
const switchTab = (tabId) => { const switchTab = (tabId) => {
activeTab.value = tabId activeTab.value = tabId
@ -807,16 +798,6 @@ const goToInviteBD = () => {
router.push('/invite-bd') 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 // BD
const apiGetBdMemberBillList = async () => { const apiGetBdMemberBillList = async () => {
const res = await getBdMemberBillList('BD') const res = await getBdMemberBillList('BD')
@ -857,10 +838,11 @@ const apiGetBdLeaderHistory = async () => {
} }
} }
const { salaryInfo } = usePageInitializationWithConfig('BD_LEADER_CENTER', { const { appConnected, userInfo, salaryInfo, handleImageError, getAvatarPlaceholder } =
needsTeamInfo: true, usePageInitializationWithConfig('BD_LEADER_CENTER', {
onDataLoaded: () => {}, needsTeamInfo: true,
}) onDataLoaded: () => {},
})
// //
const initData = () => { const initData = () => {