From 94fb8b77f20791cc6f29146fa4e4b3a76310cf5a Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Tue, 31 Mar 2026 14:10:31 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=96=B0=E9=A1=B5=E9=9D=A2):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0BD=E7=9A=84=E5=A2=9E=E9=80=81=E7=A4=BC=E7=89=A9?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bdCenter.js | 38 +++ src/router/index.js | 6 + src/utils/permissionManager.js | 1 + src/views/BDCenter/ItemDistribution.vue | 392 ++++++++++++++++++++++++ 4 files changed, 437 insertions(+) create mode 100644 src/views/BDCenter/ItemDistribution.vue diff --git a/src/api/bdCenter.js b/src/api/bdCenter.js index a09f59a..de734a9 100644 --- a/src/api/bdCenter.js +++ b/src/api/bdCenter.js @@ -95,3 +95,41 @@ export const getBdHistoryMore = async (billBelong) => { throw error } } + +// BD 可赠送道具详情 +export const getBDPropsList = async (params) => { + try { + const response = await get( + `/sys/bd/props?propsType=${params.propsType}¤cyType=${params.currencyType}`, + ) + return response + } catch (error) { + console.error('Failed to fetch admin center list:', error) + console.error('error:' + error.response.errorMsg) + throw error + } +} + +// 是否有指定道具类型的权限 +export const hasSendGiftsPermission = async (propsType) => { + try { + const response = await get(`/sys/bd/own-permission?propsType=${propsType}`) + return response + } catch (error) { + console.error('Failed to fetch has send gifts permission:', error) + console.error('error:' + error.response.errorMsg) + throw error + } +} + +// BD 赠送道具. +export const giveProps = async (data) => { + try { + const response = await post('/sys/bd/send', data) + return response + } catch (error) { + console.error('Failed to fetch give props:', error) + console.error('error:' + error.response.errorMsg) + throw error + } +} diff --git a/src/router/index.js b/src/router/index.js index b1d9d2c..850f9c3 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -117,6 +117,12 @@ const router = createRouter({ component: () => import('../views/BDCenter/policy.vue'), meta: { requiresAuth: true }, }, + { + path: '/bd-item-distribution', + name: 'bd-item-distribution', + component: () => import('../views/BDCenter/ItemDistribution.vue'), + meta: { requiresAuth: true }, + }, // 金币代理页面 { diff --git a/src/utils/permissionManager.js b/src/utils/permissionManager.js index 1c0ac8c..104b800 100644 --- a/src/utils/permissionManager.js +++ b/src/utils/permissionManager.js @@ -114,6 +114,7 @@ export const ROLE_PERMISSIONS = { PAGES.EXCHANGE, // 兑换功能 PAGES.MESSAGE, // 消息功能 INVITATION_PAGES.INVITE_AGENCY, //邀请代理 + '/bd-item-distribution', //赠送商品页面 '/team-member', '/history-salary', '/available-income', //操作收益页 diff --git a/src/views/BDCenter/ItemDistribution.vue b/src/views/BDCenter/ItemDistribution.vue new file mode 100644 index 0000000..9eb577a --- /dev/null +++ b/src/views/BDCenter/ItemDistribution.vue @@ -0,0 +1,392 @@ + + + + + + + + + + {{ t(item.name) }} + + + + + + + + + + + + {{ t('send') }} + + + + + + + + + + + + {{ t('validity') }}: + {{ validityPeriod }}{{ t('day') }} + + + + + {{ t('confirm') }} + + + + + + + + + + +