From f8e9af35a267b7b9a2bf605187a11536889a6e38 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Mon, 20 May 2024 11:00:10 +0800
Subject: [PATCH] 修改:绑定银行卡 多语言

---
 src/page/newUser/index.vue |   86 ++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 80 insertions(+), 6 deletions(-)

diff --git a/src/page/newUser/index.vue b/src/page/newUser/index.vue
index 3d27f0e..a8a81b8 100644
--- a/src/page/newUser/index.vue
+++ b/src/page/newUser/index.vue
@@ -61,7 +61,50 @@
               >{{ $t("提款") }}</van-button
             >
           </van-col>
+          <!-- <van-col span="8" style="display: flex; justify-content: center">
+            <van-button
+              @click="leverShow = true"
+              class="btn-two"
+              type="default"
+            >
+              {{ $t("申请杠杠") }}
+            </van-button>
+          </van-col> -->
         </van-row>
+
+        <van-dialog
+          v-model="leverShow"
+          :title="$t('申请杠杠')"
+          show-cancel-button
+          :cancelButtonText="$t('取消')"
+          :confirmButtonText="$t('确认')"
+          @confirm="confirmLever"
+        >
+          <van-radio-group v-model="radio">
+            <van-cell-group>
+              <van-cell title="1X" clickable @click="radio = '1'">
+                <template #right-icon>
+                  <van-radio name="1" />
+                </template>
+              </van-cell>
+              <van-cell title="2X" clickable @click="radio = '2'">
+                <template #right-icon>
+                  <van-radio name="2" />
+                </template>
+              </van-cell>
+              <van-cell title="5X" clickable @click="radio = '5'">
+                <template #right-icon>
+                  <van-radio name="5" />
+                </template>
+              </van-cell>
+              <van-cell title="10X" clickable @click="radio = '10'">
+                <template #right-icon>
+                  <van-radio name="10" />
+                </template>
+              </van-cell>
+            </van-cell-group>
+          </van-radio-group>
+        </van-dialog>
       </div>
       <div class="content-list-box">
         <div class="divider div-shrink"></div>
@@ -85,7 +128,8 @@
                 </div>
                 <div class="li-USDT">
                   <div class="DINPro">
-                    {{ item.symbol }} {{ item.availableBalance || "0.00" }}
+                    {{ item.symbol }}
+                    {{ item.availableBalance | _toLocaleString }}
                   </div>
                   <!-- <div class="DINPro">
                     ≈ $ {{ item.availableBalanceUSD || "0.00" }}
@@ -98,7 +142,20 @@
                 </div>
                 <div class="li-USDT">
                   <div class="DINPro">
-                    {{ item.symbol }} {{ item.freezeMoney || "0.00" }}
+                    {{ item.symbol }}
+                    {{ item.freezeMoney | _toLocaleString }}
+                  </div>
+                  <!-- <div class="DINPro">≈ $ {{ item.freezeMoney || "0.00" }}</div> -->
+                </div>
+              </li>
+              <li>
+                <div class="li-title">
+                  {{ $t("待补金额") }}({{ item.symbolCode }})
+                </div>
+                <div class="li-USDT">
+                  <div class="DINPro">
+                    {{ item.symbol }}
+                    {{ item.amountToBeCovered | _toLocaleString }}
                   </div>
                   <!-- <div class="DINPro">≈ $ {{ item.freezeMoney || "0.00" }}</div> -->
                 </div>
@@ -117,11 +174,15 @@
 import { isNull, pwdReg } from "@/utils/utils";
 import showHide from "@/components/showHide";
 import Vue from "vue";
+import { Notify } from "vant";
+
 export default {
   name: "newUser",
   components: { showHide },
   data() {
     return {
+      leverShow: false,
+      radio: "1",
       // 显示隐藏
       xy: true,
       listAsstes: [
@@ -154,12 +215,23 @@
     this.getInfoSite();
   },
   methods: {
+    // 申请杠杠
+    async confirmLever() {
+      const res = await api.applyLever({ lever: this.radio });
+      if (res.status === 0) {
+        Notify({
+          type: "success",
+          message: this.$t("申请杠杠成功,请联系客服!"),
+        });
+      } else {
+        Notify({ type: "warning", message: res.msg });
+      }
+    },
     kefu() {
       window.open(this.onlineService);
     },
     async getMoneyData() {
       let data = await api.getMoney();
-      console.log(data);
       if (data.status === 0) {
         // 判断是否登录
         this.moneyList = data.data;
@@ -172,6 +244,7 @@
               Vue.set(items, "freezeMoneyUSD", item.freezeMoneyUSD);
               Vue.set(items, "symbol", item.symbol);
               Vue.set(items, "symbolCode", item.symbolCode);
+              Vue.set(items, "amountToBeCovered", item.amountToBeCovered);
             }
           });
         });
@@ -292,8 +365,8 @@
     },
     handleOutLoginClick() {
       // 退出登录
-      MessageBox.confirm(this.$t("hj149") + "?", this.$t("hj165"), {
-        confirmButtonText: this.$t("hj161"),
+      MessageBox.confirm(this.$t(""), this.$t("hj165"), {
+        confirmButtonText: this.$t("qr"),
         cancelButtonText: this.$t("hj106"),
       })
         .then(() => {
@@ -452,6 +525,7 @@
       font-weight: 500;
       font-size: 0.37333rem;
       color: #2d2f3c;
+      text-align: left;
     }
     .li-USDT {
       min-width: 180px;
@@ -958,4 +1032,4 @@
 input[type="file"] {
   display: none !important;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3