fix bug
This commit is contained in:
@@ -48,12 +48,12 @@
|
||||
<div v-if="!isDeposit">
|
||||
<div class="text-red text-xs font-bold mb-2">حداقل مبلغ برداشتی 100 هزار تومان می باشد.</div>
|
||||
<div class="font-bold text-xs">
|
||||
{{ formatCashWalletBalanceText(usePriceWithoutType(walletStore?.walletInfo?.cash ?? 0)) }}
|
||||
{{ formatCashWalletBalanceText(usePriceWithoutType(cashWalletBalance)) }}
|
||||
</div>
|
||||
<a-form-item v-if="walletStore?.walletInfo" class="!mt-3">
|
||||
<a-slider
|
||||
v-model:value="form.percentWallet"
|
||||
:disabled="walletStore?.walletInfo?.cash <= 0"
|
||||
:disabled="cashWalletBalance <= 0"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:step="10"
|
||||
@@ -372,6 +372,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { formatCashWalletBalanceText } from '@/utils/productDealMethod'
|
||||
import { getCashWalletBalance } from '@/utils/productAssets'
|
||||
import { usePriceWithoutType } from '@/utils/usePrice'
|
||||
import { loading, loadingMore } from '@/utils'
|
||||
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
||||
@@ -413,6 +414,9 @@ import {
|
||||
const isDeposit = ref<boolean>(true)
|
||||
const walletStore = useWalletStore()
|
||||
const userStore = useUserStore()
|
||||
const cashWalletBalance = computed(() =>
|
||||
getCashWalletBalance(walletStore.walletInfo, userStore.userInfo?.wallets)
|
||||
)
|
||||
const showAddCard = ref<boolean>(false)
|
||||
const chargeAccountModal = ref<boolean>(false)
|
||||
const showConfirmCode = ref<boolean>(false)
|
||||
@@ -458,11 +462,11 @@ const cardForm = ref<Card>({
|
||||
|
||||
const disableButton = computed(() => {
|
||||
if (!loading.value) {
|
||||
if (walletStore?.walletInfo?.cash && !isDeposit.value) {
|
||||
if (cashWalletBalance.value && !isDeposit.value) {
|
||||
if (cardItems.value.length > 0) {
|
||||
return (
|
||||
walletStore?.walletInfo?.cash <= 0 ||
|
||||
walletStore?.walletInfo?.cash < parseInt(form.value?.value) ||
|
||||
cashWalletBalance.value <= 0 ||
|
||||
cashWalletBalance.value < parseInt(form.value?.value) ||
|
||||
isNaN(parseInt(form.value?.value)) ||
|
||||
parseInt(form.value?.value) < 1000000
|
||||
)
|
||||
@@ -477,7 +481,7 @@ const disableButton = computed(() => {
|
||||
const bganim = ref(null)
|
||||
|
||||
const unitCalculator = computed(() => {
|
||||
return (walletStore?.walletInfo?.cash ?? 0) / 100
|
||||
return cashWalletBalance.value / 100
|
||||
})
|
||||
|
||||
function copyCode(val: string) {
|
||||
|
||||
Reference in New Issue
Block a user