feat(BD中心): 新增“前往送礼页面”按钮(后台控制显隐)
This commit is contained in:
parent
94fb8b77f2
commit
0e29ee8150
@ -277,6 +277,36 @@
|
||||
</div>
|
||||
</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>
|
||||
|
||||
<!-- 遮罩层 -->
|
||||
@ -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(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user