feat(主播专用提现页面): 对接提现功能

This commit is contained in:
hzj 2026-03-16 11:52:11 +08:00
parent dd97b7ecf8
commit 3bd622f38c

View File

@ -230,9 +230,9 @@
<!-- 资料 --> <!-- 资料 -->
<div style="display: flex; justify-content: space-between; align-items: center"> <div style="display: flex; justify-content: space-between; align-items: center">
<!-- 图片数量 --> <!-- 图片数量 -->
<span style="font-weight: 510; font-size: 1em">{{ <span style="font-weight: 510; font-size: 1em"
t('passport_id_card', { current: bankCardInfo.previewUrls.length }) >{{ t('passport_id_card', { current: bankCardInfo.previewUrls.length }) }}:</span
}}</span> >
<!-- 跳转按钮 --> <!-- 跳转按钮 -->
<!-- <img <!-- <img
@ -560,17 +560,15 @@ import { useI18n } from 'vue-i18n'
import { setApplyInfo, getApplyInfo } from '@/utils/applyStore.js' import { setApplyInfo, getApplyInfo } from '@/utils/applyStore.js'
import { ref, onMounted, computed, onUnmounted } from 'vue' import { ref, onMounted, computed, onUnmounted } from 'vue'
import { useRouter, useRoute } from 'vue-router' import { useRouter, useRoute } from 'vue-router'
import { useIdentityStore } from '@/stores/identity.js'
import { setDocumentDirection } from '@/locales/i18n' import { setDocumentDirection } from '@/locales/i18n'
import {
withdrawableAmount, //
withdrawApply, //
} from '@/api/lottery'
import { import {
getBankBalance, // getBankBalance, //
getBankCardList, // 使 getBankCardList, // 使
getWithdrawInfoList, // getWithdrawInfoList, //
useBankCard, // useBankCard, //
withdrawApply, //
} from '@/api/wallet.js' } from '@/api/wallet.js'
import GeneralHeader from '@/components/GeneralHeader.vue' import GeneralHeader from '@/components/GeneralHeader.vue'
@ -588,6 +586,7 @@ const cashOutTypeShow = ref(false)
const cashOutShow = ref(false) const cashOutShow = ref(false)
const cashOutAmount = ref(null) const cashOutAmount = ref(null)
const identityStore = useIdentityStore()
const maskLayerShow = computed(() => { const maskLayerShow = computed(() => {
return cashOutTipShow.value || cashOutShow.value || cashOutTypeShow.value return cashOutTipShow.value || cashOutShow.value || cashOutTypeShow.value
@ -602,8 +601,6 @@ const closedPopup = () => {
cashOutTypeShow.value = false cashOutTypeShow.value = false
} }
const activityId = route.query.activityId || ''
const currentAmount = ref(0) // const currentAmount = ref(0) //
const bankCardInfo = ref(null) const bankCardInfo = ref(null)
@ -618,7 +615,7 @@ const gotoselectBank = () => {
// //
const lookDetails = () => { const lookDetails = () => {
router.push({ path: '/cash-out-details', query: { activityId: activityId } }) router.push('/cash-out-details')
} }
// //
@ -641,12 +638,19 @@ const Receive = async () => {
// + // +
else if (checkStatus.value) { else if (checkStatus.value) {
try { try {
console.log('当前身份:', identityStore.identity)
let salaryType =
identityStore.identity == 'ADMIN'
? 'ADMIN_SALARY'
: ['BD_LEADER', 'BD'].includes(identityStore.identity)
? 'BD_SALARY'
: 'HOST_SALARY'
const resApply = await withdrawApply({ const resApply = await withdrawApply({
activityId: activityId,
amount: cashOutAmount.value, amount: cashOutAmount.value,
contactNumber: bankCardInfo.value.contactNumber, acceptBankCardId: usedBankCard.value.id,
cardImages: JSON.stringify(bankCardInfo.value.previewUrls), salaryType,
description: bankCardInfo.value.otherDescription,
}) })
if (resApply.status) { if (resApply.status) {
closedPopup() closedPopup()