From b8f6f514b675fa6a006dfafbc99303b3c5c8ba85 Mon Sep 17 00:00:00 2001
From: dcc <dcc@163.com>
Date: Fri, 17 May 2024 10:52:12 +0800
Subject: [PATCH] 一鍵平倉增加英文多语言,IFSC改成Select recharge account

---
 src/page/trading/buy.vue |   39 ++++++++++++++++++++++-----------------
 1 files changed, 22 insertions(+), 17 deletions(-)

diff --git a/src/page/trading/buy.vue b/src/page/trading/buy.vue
index 14c23b0..1ead262 100644
--- a/src/page/trading/buy.vue
+++ b/src/page/trading/buy.vue
@@ -8,10 +8,10 @@
           </div>
           <div class="right_title">
             <div class="t_t" style="white-space: nowrap">
-              <span>{{ name | getName }}</span>
+              <span>{{ name }}</span>
             </div>
             <div class="b_t">
-              <span>{{ code }}</span>
+              <span>{{ spell }}</span>
             </div>
           </div>
         </div>
@@ -228,6 +228,7 @@
 
 <script>
 import * as api from "@/axios/api";
+import { mapActions } from "vuex";
 
 export default {
   name: "trBuy",
@@ -251,6 +252,9 @@
     if (this.$route.query.name) {
       this.name = this.$route.query.name;
     }
+    if (this.$route.query.spell) {
+      this.spell = this.$route.query.spell;
+    }
     if (this.$route.query.type) {
       this.type = this.$route.query.type;
     }
@@ -272,6 +276,7 @@
       type: 0,
       code: "",
       name: "",
+      spell: "",
       settingInfo: [],
       selectCycle: 1,
       siteLeverList: [],
@@ -313,7 +318,7 @@
     } else if (this.bayType == "qh") {
       this.priceTabs = [this.$t("hj108")];
     }
-    this.getUserInfo();
+    this.setUseInfo();
     this.getMoneyData();
     this.getSettingInfo();
   },
@@ -332,6 +337,8 @@
     },
   },
   methods: {
+    ...mapActions(["setUseInfo"]),
+
     async getMoneyData() {
       let data = await api.getMoney();
       let type = this.bayType === "SZHB" ? "US" : this.bayType;
@@ -458,7 +465,7 @@
           elAlertType: "success",
         });
         this.getUserInfo();
-        this.$router.push("/warehouse?index=1");
+        this.$router.push("/warehouse?index=1&buyType=" + this.bayType);
       } else {
         this.$store.commit("elAlertShow", {
           elAlertShow: true,
@@ -476,15 +483,7 @@
         this.$router.push("/authentications");
         return;
       }
-      // if (!this.agree) {
-      //   Toast('需同意合作协议才能交易!')
-      // } else if (isNull(this.selectNumber) && isNull(this.autoNumber)) {
-      //   Toast('请选择购买手数')
-      // } else if (isNull(this.selectType)) {
-      //   Toast('请选择买卖方向')
-      // } else if(isNull(this.subaccountNumber)) {
-      //   Toast('请选择子账户')
-      // } else {}
+
       if (this.buying) {
         return;
       }
@@ -538,7 +537,13 @@
           elAlertType: "success",
         });
         this.getUserInfo();
-        this.$router.push("/warehouse?index=0");
+        var buyType = "";
+        if (this.tabsCurrentIndex == 0) {
+          buyType = 1;
+        } else {
+          buyType = 0;
+        }
+        this.$router.push("/warehouse?index=1&buyType=" + this.bayType);
       } else {
         if (data.msg.indexOf("不在交易时段内") > -1) {
           this.$store.commit("elAlertShow", {
@@ -565,7 +570,7 @@
           elAlertType: "success",
         });
         this.getUserInfo();
-        this.$router.push("/warehouse?index=0");
+        this.$router.push("/warehouse?index=1&buyType=" + this.bayType);
       } else {
         this.$store.commit("elAlertShow", {
           elAlertShow: true,
@@ -613,7 +618,7 @@
             i++
           ) {
             let val = this.$store.state.userInfo.siteLever.split("/")[i];
-            let item = { label: val + this.$t("hj112"), value: val };
+            let item = { label: val + this.$t("hj112"), name: val, gg: val};
             this.siteLeverList.push(item);
           }
         } else {
@@ -643,7 +648,7 @@
   filters: {
     getName(name) {
       if (name.length > 15) {
-        return name.substring(0, 14);
+        return name;
       } else {
         return name;
       }

--
Gitblit v1.9.3