Bladeren bron

[fix] bug

wenliming 2 jaren geleden
bovenliggende
commit
a9e6889313

+ 7 - 7
src/view/components/popup-withdraw.vue

@@ -33,8 +33,7 @@
                                 v-model="requestWithdrawParams.amountValue" 
                                 placeholder="$0"
                                 style="width: 220px"
-                                @input="onAmountInput" 
-                                @blur="onAmountBlur" />
+                                @input="onAmountInput"  />
                             <div @click="withdrawalAll" class="withdrawal-all-btn">
                                 Withdrawal All
                             </div>
@@ -188,12 +187,14 @@ const withdrawCalcAmount = () => {
         if (res.code == 0) {
             finalWithdrawalAmount.value = res.data.finalAmountValue;
         }
+    }).catch(err => {
+        calcReq.value = false;
     })
 }
 
 const withdrawCalcAmountDebounce = debounce(function () {
     withdrawCalcAmount();
-}, 1000)
+}, 300)
 
 /**
  * 提现
@@ -233,10 +234,9 @@ const withdraw = () => {
         } else {
             console.log(res);
         }
-    })
-        .catch((err) => {
-            console.log(err);
-        });
+    }).catch((err) => {
+        console.log(err);
+    });
 };
 
 const onAmountBlur = () => {

+ 5 - 1
src/view/iframe/publish/components/pay-button.vue

@@ -7,7 +7,7 @@
                 v-show="currentCurrencyInfo.currencyCode == 'USD'">
                 <div class="token-pay" 
                     @click="clickPayUSD">
-                    Pay {{finalAmountData.rechargeAmountValue > 0 ? finalAmountData.rechargeAmountValue : finalAmountData.orderAmountValue}} {{currentCurrencyInfo.tokenSymbol}}
+                    Pay {{finalAmountData.rechargeAmountValue > 0 && USDepositStatus != 'SUCCESS' ? finalAmountData.rechargeAmountValue : finalAmountData.orderAmountValue}} {{currentCurrencyInfo.tokenSymbol}}
                 </div>
 
                 <!-- <iframe
@@ -60,6 +60,10 @@ const props = defineProps({
 
         }
     },
+    USDepositStatus: {
+        type: String,
+        default: 'DEFAULT'
+    }
 });
 
 let iframe = ref(null);

+ 5 - 1
src/view/iframe/publish/give-dialog.vue

@@ -312,6 +312,7 @@
                                     postId
                                 }"
                                 :currentCurrencyInfo="currentCurrencyInfo"
+                                :USDepositStatus = "USDepositStatus"
                                 @showDepositMask="showDepositMessageBox = true"
                                 @payFinish="payFinish">
                                 <template v-slot:balance>
@@ -448,6 +449,8 @@ let dialogStyle = reactive({
     dialogContentWidth: 1100
 })
 
+let USDepositStatus = ref('DEFAULT');
+
 let cropperOption = ref({
     img: '',
     full: true,
@@ -1881,7 +1884,8 @@ const depositAchConfirm = async () => {
         currentCurrencyInfo.value = currencyInfoRes.data;
 
         let {balance} = currencyInfoRes.data;
-        if(balance > finalAmountData.value.orderAmountValue) {
+        if(balance >= finalAmountData.value.orderAmountValue) {
+            USDepositStatus.value = 'SUCCESS';
             // payButtonDom.value && payButtonDom.value.balancePay();
         } else {
             message.info('Deposit failed, please try again later');