feat(主播专用提现页面): 对接提现功能
This commit is contained in:
parent
dd97b7ecf8
commit
3bd622f38c
@ -230,9 +230,9 @@
|
||||
<!-- 资料 -->
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<!-- 图片数量 -->
|
||||
<span style="font-weight: 510; font-size: 1em">{{
|
||||
t('passport_id_card', { current: bankCardInfo.previewUrls.length })
|
||||
}}</span>
|
||||
<span style="font-weight: 510; font-size: 1em"
|
||||
>{{ t('passport_id_card', { current: bankCardInfo.previewUrls.length }) }}:</span
|
||||
>
|
||||
|
||||
<!-- 跳转按钮 -->
|
||||
<!-- <img
|
||||
@ -560,17 +560,15 @@ import { useI18n } from 'vue-i18n'
|
||||
import { setApplyInfo, getApplyInfo } from '@/utils/applyStore.js'
|
||||
import { ref, onMounted, computed, onUnmounted } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { useIdentityStore } from '@/stores/identity.js'
|
||||
import { setDocumentDirection } from '@/locales/i18n'
|
||||
|
||||
import {
|
||||
withdrawableAmount, // 获取可提现金额
|
||||
withdrawApply, // 提交提现申请
|
||||
} from '@/api/lottery'
|
||||
import {
|
||||
getBankBalance, // 获取余额
|
||||
getBankCardList, // 获取正在使用的银行卡
|
||||
getWithdrawInfoList, // 获取申请提现信息
|
||||
useBankCard, // 设置默认银行卡
|
||||
withdrawApply, //提现
|
||||
} from '@/api/wallet.js'
|
||||
|
||||
import GeneralHeader from '@/components/GeneralHeader.vue'
|
||||
@ -588,6 +586,7 @@ const cashOutTypeShow = ref(false)
|
||||
const cashOutShow = ref(false)
|
||||
|
||||
const cashOutAmount = ref(null)
|
||||
const identityStore = useIdentityStore()
|
||||
|
||||
const maskLayerShow = computed(() => {
|
||||
return cashOutTipShow.value || cashOutShow.value || cashOutTypeShow.value
|
||||
@ -602,8 +601,6 @@ const closedPopup = () => {
|
||||
cashOutTypeShow.value = false
|
||||
}
|
||||
|
||||
const activityId = route.query.activityId || ''
|
||||
|
||||
const currentAmount = ref(0) //可提现金额
|
||||
|
||||
const bankCardInfo = ref(null)
|
||||
@ -618,7 +615,7 @@ const gotoselectBank = () => {
|
||||
|
||||
// 查看历史提现信息
|
||||
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) {
|
||||
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({
|
||||
activityId: activityId,
|
||||
amount: cashOutAmount.value,
|
||||
contactNumber: bankCardInfo.value.contactNumber,
|
||||
cardImages: JSON.stringify(bankCardInfo.value.previewUrls),
|
||||
description: bankCardInfo.value.otherDescription,
|
||||
acceptBankCardId: usedBankCard.value.id,
|
||||
salaryType,
|
||||
})
|
||||
if (resApply.status) {
|
||||
closedPopup()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user