From 0e29ee815050c90a0677c3de5879ae6376c4e18d Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Tue, 31 Mar 2026 14:11:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(BD=E4=B8=AD=E5=BF=83):=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E2=80=9C=E5=89=8D=E5=BE=80=E9=80=81=E7=A4=BC=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E2=80=9D=E6=8C=89=E9=92=AE=EF=BC=88=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E6=98=BE=E9=9A=90=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/BDCenter/index.vue | 53 +++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/src/views/BDCenter/index.vue b/src/views/BDCenter/index.vue index 09826bf..e8149a5 100644 --- a/src/views/BDCenter/index.vue +++ b/src/views/BDCenter/index.vue @@ -277,6 +277,36 @@ + + +
+
+ {{ t('send_welcome_gift') }} + +
+
@@ -550,7 +580,12 @@ import { setDocumentDirection } from '@/locales/i18n' import { useIdentityStore } from '@/stores/identity.js' import { handleAvatarImageError } from '@/utils/image/imageHandler.js' -import { getBdMemberBillList, getBdHistory, getBdHistoryMore } from '@/api/bdCenter.js' +import { + getBdMemberBillList, + getBdHistory, + getBdHistoryMore, + hasSendGiftsPermission, +} from '@/api/bdCenter.js' import { apiGetBankBalance } from '@/api/wallet.js' import GeneralHeader from '@/components/GeneralHeader.vue' @@ -565,6 +600,9 @@ const identityStore = useIdentityStore() // 监听语言变化并设置文档方向 locale.value && setDocumentDirection(locale.value) +const sendShow = ref(false) +// const sendShow = ref(true) + // 当前身份 const showHistory = ref(false) //历史弹窗 const showMore = ref(false) //更多弹窗 @@ -602,6 +640,10 @@ const goToInviteAgency = () => { router.push('/invite-agency') } +const goToSend = () => { + router.push({ path: '/bd-item-distribution' }) +} + // 查询可用余额 const getBankBalance = async () => { const res = await apiGetBankBalance('BD_SALARY') @@ -617,6 +659,14 @@ const { appConnected, userInfo } = usePageInitializationWithConfig('BD_CENTER', onDataLoaded: () => {}, }) +// 检查是否有赠送某个栏目商品的资格 +const getHasSendGiftsPermission = async () => { + const response = await hasSendGiftsPermission('AVATAR_FRAME') + if (response.status) { + sendShow.value = response.body + } +} + // 查询BD成员账单列表 const apiGetBdMemberBillList = async () => { const res = await getBdMemberBillList('BD') @@ -657,6 +707,7 @@ const initData = async () => { apiGetBdMemberBillList() //BD成员账单列表 apiGetBdHistory() //BD历史记录 getBankBalance() // 查询可用余额 + getHasSendGiftsPermission() //检查是否有赠送某个栏目商品的资格 } onMounted(() => {