From a8b0eb32d97e7a540692a8a29f610fe76d67ef74 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Mon, 28 Jul 2025 17:39:39 +0800
Subject: [PATCH] 1

---
 src/page/user/recharge-sure.vue |   66 ++++++++++++++++++++++++--------
 1 files changed, 49 insertions(+), 17 deletions(-)

diff --git a/src/page/user/recharge-sure.vue b/src/page/user/recharge-sure.vue
index 894ce3f..5617f62 100644
--- a/src/page/user/recharge-sure.vue
+++ b/src/page/user/recharge-sure.vue
@@ -3,7 +3,7 @@
     <van-nav-bar
       :placeholder="true"
       :safe-area-inset-top="true"
-      :title="$t('提款')"
+      :title="$t('hj177')"
       left-arrow
       @click-left="onClickLeft"
     >
@@ -45,20 +45,34 @@
       />
       <div v-if="rechargeSelect.key !== undefined">
         <div class="main-title">{{ $t("請選擇銀行卡") }}</div>
-        <van-cell is-link :title="bankCard.bankNo || $t('請選擇')" />
+        <!-- <van-cell is-link :title="bankCard.bankName || $t('請選擇')" /> -->
+        <van-cell
+          is-link
+           :title="yhkrechargeSelect.bankName || $t('請選擇')"
+          @click="yhkshow = true"
+        />
+        <van-action-sheet
+          v-model="yhkshow"
+          :actions="yhkactions"
+          :cancel-text="$t('hj106')"
+          close-on-click-action
+          @select="yhkselect"
+        />
       </div>
-      <div class="main-title">{{ $t("請選擇充值金額") }}</div>
+      <div class="main-title">{{ $t("请选择提现金额") }}</div>
       <div class="white-input">
         <input type="number" :value="value" @input="inputValue" />
-        <span class="myr" @click="value = availableBalanceUSD">{{
-          $t("最大")
-        }}</span>
+        <span
+          class="myr"
+          @click="value = Math.floor(availableBalanceUSD * 100) / 100"
+          >{{ $t("最大") }}</span
+        >
       </div>
       <div>
         <div class="dz-title" v-if="rechargeAccountData.key !== undefined">
           <div>{{ $t("可用餘額") }}</div>
           <div class="balance-text">
-            {{ availableBalanceUSD | _toString }} {{ symbolCode }}
+            {{ availableBalanceUSD  }} {{ symbolCode }}
             <!-- {{ symbolCode }} -->
           </div>
         </div>
@@ -68,7 +82,8 @@
         type="primary"
         style="margin-top: 1.04rem; margin-bottom: 1.04rem"
         @click="setOutMoney"
-        >{{ $t("提款") }}</van-button
+        :disabled="isclick"
+        >{{ $t("hj177") }}</van-button
       >
     </main>
   </div>
@@ -77,6 +92,7 @@
 <script>
 import { ActionSheet, Notify } from "vant";
 import ClipboardJS from "clipboard";
+import _ from 'lodash';
 import { getBankCard, getMoney, outMoney } from "../../axios/api";
 
 export default {
@@ -85,13 +101,15 @@
     return {
       value: 0,
 
-      paymentSelectData: "IN",
-
+      paymentSelectData: "JP",
+      isclick:false,
       show: false,
-
+      yhkshow:false,
       // 提款聚到
       rechargeSelect: {},
+      yhkrechargeSelect: {},
       actions: [{ name: this.$t("hj215"), key: "YHK" }],
+      yhkactions: [],
       paymentShow: false,
 
       rechargeAccountShow: false,
@@ -99,8 +117,8 @@
       rechargeAccountData: {},
       rechargeAccountActions: [
         {
-          name: this.$t("IN"),
-          key: "IN",
+          name: this.$t("日股"),
+          key: "JP",
         },
         // {
         //   name: this.$t("MAS"),
@@ -112,11 +130,12 @@
         // },
       ],
 
-      bankCard: {},
+      bankCard: [],
       availableBalanceUSD: "0.0000",
       getMoneyList: [],
       assetsType: "",
       symbolCode: "",
+      yhkid:'',
     };
   },
   mounted() {
@@ -125,15 +144,19 @@
   },
   methods: {
     async setOutMoney() {
+      if (this.isclick) return;
+      console.log('11111');
       const res = await outMoney({
         amt: this.value,
         assetsType: this.accectType,
+        bankId:this.yhkid
       });
+      this.isclick = false;
       if (res.status === 0) {
         Notify({ type: "success", message: this.$t("hj182") });
-        setTimeout(() => {
+        // setTimeout(() => {
           this.$router.push("/cashlist");
-        }, 500);
+        // }, 500);
       } else {
         Notify(res.msg);
       }
@@ -146,6 +169,10 @@
       const res = await getBankCard();
       if (res.status === 0) {
         this.bankCard = res.data;
+        this.yhkactions = res.data
+        for(var i = 0;i<this.yhkactions.length;i++){
+          this.yhkactions[i].name = this.yhkactions[i].bankName
+        }
       }
     },
     async getMoneys() {
@@ -180,6 +207,11 @@
     onClickLeft() {
       this.$router.push("/user");
     },
+    yhkselect(e) {
+      this.yhkrechargeSelect = e;
+      this.yhkid = e.id
+      console.log(e);
+    },
     select(e) {
       this.rechargeSelect = e;
       console.log(e);
@@ -206,7 +238,7 @@
 .but {
   width: 100%;
   color: #ffffff;
-  background-color: #1989fa;
+  background-color: #185546;
   border-radius: 8px;
   height: 66px;
   font-size: 22px;

--
Gitblit v1.9.3