fix(提现功能): 银行卡信息提交调整,取消部分无意义提示和图标
This commit is contained in:
parent
5ff62f0f99
commit
d1347f8bcc
@ -730,7 +730,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { ref, reactive, onMounted, onUnmounted, computed } from 'vue'
|
import { ref, reactive, onMounted, onUnmounted, computed } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import GeneralHeader from '@/components/GeneralHeader.vue'
|
import GeneralHeader from '@/components/GeneralHeader.vue'
|
||||||
import {
|
import {
|
||||||
getBankBalance,
|
getBankBalance,
|
||||||
@ -749,6 +749,7 @@ import { setDocumentDirection } from '@/locales/i18n'
|
|||||||
|
|
||||||
const { t, locale } = useI18n()
|
const { t, locale } = useI18n()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
// 监听语言变化并设置文档方向
|
// 监听语言变化并设置文档方向
|
||||||
locale.value && setDocumentDirection(locale.value)
|
locale.value && setDocumentDirection(locale.value)
|
||||||
@ -756,7 +757,7 @@ locale.value && setDocumentDirection(locale.value)
|
|||||||
const availableIncome = ref('')
|
const availableIncome = ref('')
|
||||||
const selectedCoin = ref(null)
|
const selectedCoin = ref(null)
|
||||||
const selectedExchangeOption = ref(null)
|
const selectedExchangeOption = ref(null)
|
||||||
const activeAction = ref('Exchange')
|
const activeAction = ref(route.query.activeAction || 'Exchange')
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
|
||||||
const exchangeTipShow = ref(false)
|
const exchangeTipShow = ref(false)
|
||||||
@ -1026,7 +1027,7 @@ const handleExchange = async () => {
|
|||||||
|
|
||||||
// 是否可以提现
|
// 是否可以提现
|
||||||
const checkStatus = computed(() => {
|
const checkStatus = computed(() => {
|
||||||
return bankCardInfo.value?.status == 'PASS' && usedBankCard.value?.id && cashOutAmount.value > 50
|
return bankCardInfo.value?.status == 'PASS' && usedBankCard.value?.id && cashOutAmount.value >= 50
|
||||||
})
|
})
|
||||||
|
|
||||||
// 确认提现
|
// 确认提现
|
||||||
|
|||||||
@ -15,22 +15,12 @@
|
|||||||
<div v-if="!usedBankCard.cardNo" style="font-weight: 510; color: rgba(0, 0, 0, 0.4)">
|
<div v-if="!usedBankCard.cardNo" style="font-weight: 510; color: rgba(0, 0, 0, 0.4)">
|
||||||
Bank cards are not currently in use.
|
Bank cards are not currently in use.
|
||||||
</div>
|
</div>
|
||||||
<div v-else style="display: flex">
|
<div v-else style="display: flex; flex-direction: column; justify-content: space-around">
|
||||||
<div style="width: 15%; display: flex; justify-content: center; align-items: center">
|
<div style="font-weight: 510; color: rgba(0, 0, 0, 0.4)">
|
||||||
<img
|
Card Number:{{ usedBankCard.cardNo }}
|
||||||
src="/src/assets/icon/coin.png"
|
|
||||||
alt=""
|
|
||||||
style="display: block; width: 100%; object-fit: cover"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div style="font-weight: 510; color: rgba(0, 0, 0, 0.4)">
|
||||||
<div style="display: flex; flex-direction: column; justify-content: space-around">
|
Payee:{{ usedBankCard.payee }}
|
||||||
<div style="font-weight: 510; color: rgba(0, 0, 0, 0.4)">
|
|
||||||
Card Number:{{ usedBankCard.cardNo }}
|
|
||||||
</div>
|
|
||||||
<div style="font-weight: 510; color: rgba(0, 0, 0, 0.4)">
|
|
||||||
Payee:{{ usedBankCard.payee }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -62,59 +52,49 @@
|
|||||||
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25);
|
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25);
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div style="display: flex; align-items: center; gap: 4px">
|
<div style="display: flex; flex-direction: column; gap: 4px">
|
||||||
<div style="width: 15%">
|
<div style="font-weight: 510; color: rgba(0, 0, 0, 0.4)">
|
||||||
<img
|
Card Number:{{ card.cardNo }}
|
||||||
src="/src/assets/icon/coin.png"
|
|
||||||
alt=""
|
|
||||||
style="display: block; width: 100%; object-fit: cover"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div style="font-weight: 510; color: rgba(0, 0, 0, 0.4)">Payee:{{ card.payee }}</div>
|
||||||
<div style="display: flex; flex-direction: column; gap: 4px">
|
<div style="display: flex; align-items: center; gap: 8px">
|
||||||
<div style="font-weight: 510; color: rgba(0, 0, 0, 0.4)">
|
<div
|
||||||
Card Number:{{ card.cardNo }}
|
style="
|
||||||
|
font-size: 0.9em;
|
||||||
|
font-weight: 700;
|
||||||
|
padding: 2px 12px;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 16px;
|
||||||
|
background: radial-gradient(
|
||||||
|
107.94% 107.94% at 15.9% 13.54%,
|
||||||
|
rgba(255, 255, 255, 0.2) 0%,
|
||||||
|
rgba(255, 255, 255, 0) 100%
|
||||||
|
),
|
||||||
|
linear-gradient(180deg, #fff 0%, #000 100%), #ff6464;
|
||||||
|
background-blend-mode: normal, soft-light, normal;
|
||||||
|
"
|
||||||
|
@click="removeBankCard(card.id)"
|
||||||
|
>
|
||||||
|
Delet
|
||||||
</div>
|
</div>
|
||||||
<div style="font-weight: 510; color: rgba(0, 0, 0, 0.4)">Payee:{{ card.payee }}</div>
|
<div
|
||||||
<div style="display: flex; align-items: center; gap: 8px">
|
style="
|
||||||
<div
|
font-size: 0.9em;
|
||||||
style="
|
font-weight: 700;
|
||||||
font-size: 0.9em;
|
padding: 2px 12px;
|
||||||
font-weight: 700;
|
color: #fff;
|
||||||
padding: 2px 12px;
|
border-radius: 16px;
|
||||||
color: #fff;
|
background: radial-gradient(
|
||||||
border-radius: 16px;
|
107.94% 107.94% at 15.9% 13.54%,
|
||||||
background: radial-gradient(
|
rgba(255, 255, 255, 0.2) 0%,
|
||||||
107.94% 107.94% at 15.9% 13.54%,
|
rgba(255, 255, 255, 0) 100%
|
||||||
rgba(255, 255, 255, 0.2) 0%,
|
),
|
||||||
rgba(255, 255, 255, 0) 100%
|
linear-gradient(180deg, #fff 0%, #000 100%), #b464ff;
|
||||||
),
|
background-blend-mode: normal, soft-light, normal;
|
||||||
linear-gradient(180deg, #fff 0%, #000 100%), #ff6464;
|
"
|
||||||
background-blend-mode: normal, soft-light, normal;
|
@click="setDefaultBankCard(card.id)"
|
||||||
"
|
>
|
||||||
@click="removeBankCard(card.id)"
|
Use
|
||||||
>
|
|
||||||
Delet
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
style="
|
|
||||||
font-size: 0.9em;
|
|
||||||
font-weight: 700;
|
|
||||||
padding: 2px 12px;
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 16px;
|
|
||||||
background: radial-gradient(
|
|
||||||
107.94% 107.94% at 15.9% 13.54%,
|
|
||||||
rgba(255, 255, 255, 0.2) 0%,
|
|
||||||
rgba(255, 255, 255, 0) 100%
|
|
||||||
),
|
|
||||||
linear-gradient(180deg, #fff 0%, #000 100%), #b464ff;
|
|
||||||
background-blend-mode: normal, soft-light, normal;
|
|
||||||
"
|
|
||||||
@click="setDefaultBankCard(card.id)"
|
|
||||||
>
|
|
||||||
Use
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -123,6 +103,7 @@
|
|||||||
|
|
||||||
<div style="height: 50px"></div>
|
<div style="height: 50px"></div>
|
||||||
|
|
||||||
|
<!-- 添加按钮 -->
|
||||||
<div
|
<div
|
||||||
style="
|
style="
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -158,7 +139,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 弹窗遮罩层 -->
|
<!-- 弹窗遮罩层 -->
|
||||||
<maskLayer :maskLayerShow="maskLayerShow" @click="maskLayerShow = false">
|
<maskLayer :maskLayerShow="maskLayerShow" @click="closedPopup">
|
||||||
<!-- 选择提现方式抽屉 -->
|
<!-- 选择提现方式抽屉 -->
|
||||||
<div style="position: fixed; bottom: 0; width: 100%">
|
<div style="position: fixed; bottom: 0; width: 100%">
|
||||||
<div
|
<div
|
||||||
@ -239,6 +220,30 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 输入银行卡号 -->
|
||||||
|
<div v-if="cardNameShow" style="font-size: 0.9em; font-weight: 600; margin-bottom: 4px">
|
||||||
|
Card Name:
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="cardNameShow"
|
||||||
|
style="box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25); border-radius: 8px; padding: 12px"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
name=""
|
||||||
|
id=""
|
||||||
|
placeholder="Enter the Card Name"
|
||||||
|
style="
|
||||||
|
width: 100%;
|
||||||
|
outline: none;
|
||||||
|
border: none;
|
||||||
|
background-color: transparent;
|
||||||
|
color: black;
|
||||||
|
"
|
||||||
|
v-model="selectedMethod.cardName"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 输入银行卡号 -->
|
<!-- 输入银行卡号 -->
|
||||||
<div style="font-size: 0.9em; font-weight: 600; margin-bottom: 4px">Card Number:</div>
|
<div style="font-size: 0.9em; font-weight: 600; margin-bottom: 4px">Card Number:</div>
|
||||||
<div style="box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25); border-radius: 8px; padding: 12px">
|
<div style="box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25); border-radius: 8px; padding: 12px">
|
||||||
@ -306,7 +311,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { ref, reactive, onMounted, onUnmounted, computed } from 'vue'
|
import { ref, onMounted, computed } from 'vue'
|
||||||
import { showError, showWarning, showInfo, showSuccess } from '@/utils/toast.js'
|
import { showError, showWarning, showInfo, showSuccess } from '@/utils/toast.js'
|
||||||
import { getUserId } from '@/utils/userStore'
|
import { getUserId } from '@/utils/userStore'
|
||||||
import {
|
import {
|
||||||
@ -322,6 +327,7 @@ const { t } = useI18n()
|
|||||||
|
|
||||||
const maskLayerShow = ref(false)
|
const maskLayerShow = ref(false)
|
||||||
const withdrawelMethodShow = ref(false)
|
const withdrawelMethodShow = ref(false)
|
||||||
|
const cardNameShow = ref(false)
|
||||||
|
|
||||||
const withdrawalWaysList = ref([]) // 提现方式列表
|
const withdrawalWaysList = ref([]) // 提现方式列表
|
||||||
const bankCardList = ref([]) // 银行卡列表
|
const bankCardList = ref([]) // 银行卡列表
|
||||||
@ -345,13 +351,32 @@ const selectedMethod = ref({
|
|||||||
|
|
||||||
// 检查需要添加的银行卡信息是否填写完整
|
// 检查需要添加的银行卡信息是否填写完整
|
||||||
const checkpassed = computed(() => {
|
const checkpassed = computed(() => {
|
||||||
return selectedMethod.value.cardType && selectedMethod.value.cardNo && selectedMethod.value.payee
|
return (
|
||||||
|
selectedMethod.value.cardType &&
|
||||||
|
selectedMethod.value.cardName &&
|
||||||
|
selectedMethod.value.cardNo &&
|
||||||
|
selectedMethod.value.payee
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 关闭弹窗
|
||||||
|
const closedPopup = () => {
|
||||||
|
maskLayerShow.value = false
|
||||||
|
withdrawelMethodShow.value = false
|
||||||
|
cardNameShow.value = false
|
||||||
|
}
|
||||||
|
|
||||||
// 选择充值方式
|
// 选择充值方式
|
||||||
const selectMethod = (way) => {
|
const selectMethod = (way) => {
|
||||||
selectedMethod.value.cardType = way
|
selectedMethod.value.cardType = way
|
||||||
selectedMethod.value.cardName = way
|
if (way === 'USDT') {
|
||||||
|
selectedMethod.value.cardName = way
|
||||||
|
cardNameShow.value = false
|
||||||
|
} else if (way === 'BANK') {
|
||||||
|
selectedMethod.value.cardName = ''
|
||||||
|
cardNameShow.value = true
|
||||||
|
}
|
||||||
|
|
||||||
withdrawelMethodShow.value = !withdrawelMethodShow.value
|
withdrawelMethodShow.value = !withdrawelMethodShow.value
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,7 +387,7 @@ const Confirm = async () => {
|
|||||||
const resAddCard = await addBankCard(selectedMethod.value)
|
const resAddCard = await addBankCard(selectedMethod.value)
|
||||||
if (resAddCard.status) {
|
if (resAddCard.status) {
|
||||||
// 添加成功
|
// 添加成功
|
||||||
maskLayerShow.value = false
|
closedPopup() //关闭弹窗
|
||||||
selectedMethod.value = {
|
selectedMethod.value = {
|
||||||
...selectedMethod.value,
|
...selectedMethod.value,
|
||||||
cardType: '',
|
cardType: '',
|
||||||
@ -425,7 +450,7 @@ const removeBankCard = async (cardId) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
showError(error.response?.errorMsg)
|
showError(error.response?.errorMsg || '')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -437,33 +462,7 @@ const setDefaultBankCard = async (cardId) => {
|
|||||||
getBankCards() // 重新获取银行卡列表
|
getBankCards() // 重新获取银行卡列表
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
showError(error.response?.errorMsg)
|
showError(error.response?.errorMsg || '')
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 添加提现信息
|
|
||||||
const addNewWithdrawInfo = async (infoData) => {
|
|
||||||
try {
|
|
||||||
const resAddInfo = await addWithdrawInfo(infoData)
|
|
||||||
if (resAddInfo.status) {
|
|
||||||
showSuccess(t('withdraw_info_added'))
|
|
||||||
getWithdrawInfo() // 重新获取提现信息列表
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
showError(error.response?.errorMsg || t('add_withdraw_info_failed'))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新提现信息
|
|
||||||
const updateWithdrawInfoData = async (infoData) => {
|
|
||||||
try {
|
|
||||||
const resUpdateInfo = await updateWithdrawInfo(infoData)
|
|
||||||
if (resUpdateInfo.status) {
|
|
||||||
showSuccess(t('withdraw_info_updated'))
|
|
||||||
getWithdrawInfo() // 重新获取提现信息列表
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
showError(error.response?.errorMsg || t('update_withdraw_info_failed'))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -168,13 +168,16 @@
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
border-radius: 32px;
|
border-radius: 32px;
|
||||||
background: linear-gradient(135deg, #bb92ff 2.82%, #8b45ff 99.15%),
|
|
||||||
linear-gradient(135deg, #d1ced6 2.82%, #7c7882 99.15%);
|
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-weight: 590;
|
font-weight: 590;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
"
|
"
|
||||||
|
:style="{
|
||||||
|
background: checkStatus
|
||||||
|
? 'linear-gradient(135deg, #BB92FF 2.82%, #8B45FF 99.15%), linear-gradient(135deg, #D1CED6 2.82%, #7C7882 99.15%)'
|
||||||
|
: 'linear-gradient(135deg, #D1CED6 2.82%, #7C7882 99.15%)',
|
||||||
|
}"
|
||||||
@click="Submit"
|
@click="Submit"
|
||||||
>
|
>
|
||||||
{{ t('submit') }}
|
{{ t('submit') }}
|
||||||
@ -357,9 +360,6 @@ const Submit = () => {
|
|||||||
addWithdrawInfoData()
|
addWithdrawInfoData()
|
||||||
}
|
}
|
||||||
// router.go(-1)
|
// router.go(-1)
|
||||||
} else {
|
|
||||||
showError(t('please_enter_contact_number'))
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user