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 @@ + + + + +