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">
|
<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()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user