feat(bdLeader中心): 新增和bd中心一样的赠送按钮

This commit is contained in:
hzj 2026-04-28 15:24:04 +08:00
parent ba449f4681
commit c132584289

View File

@ -165,6 +165,35 @@
</div>
</div>
<div
v-if="sendShow"
style="
background-color: white;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
padding: 16px;
cursor: pointer;
transition: all 0.2s;
border: 1px solid #e5e7eb;
display: flex;
flex-direction: column;
gap: 10px;
"
@click="goToSend"
>
<div style="display: flex; justify-content: space-between; align-items: center">
<span style="font-weight: 600; color: #1f2937"> {{ t('send_welcome_gift') }}</span>
<img
src="../../assets/icon/Azizi/arrow.png"
alt=""
style="display: block; width: 20px"
class="flipImg"
/>
</div>
</div>
<!-- 标签页 -->
<div
style="
@ -961,7 +990,12 @@ import { usePageInitializationWithConfig } from '@/utils/pageConfig.js'
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 { getBdLeaderHistory, getBdLeaderHistoryMore } from '@/api/bdLeaderCenter'
import { apiGetBankBalance } from '@/api/wallet.js'
@ -984,6 +1018,7 @@ const tabs = ref([
])
const activeTab = ref(1)
const sendShow = ref(false)
const showHistory = ref(false)
const showMore = ref(false)
const showRemovePopup = ref(false)
@ -1074,6 +1109,17 @@ const goToInviteBD = () => {
router.push('/invite-bd')
}
const goToSend = () => {
router.push({ path: '/bd-item-distribution' })
}
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')
@ -1144,6 +1190,7 @@ const initData = () => {
apiGetBdLeaderHistory() //BD Leader
apiGetBdLeaderMemberBillList() //BD Leader
getBankBalance() //
getHasSendGiftsPermission()
}
onMounted(() => {