zzzz
2024-04-09 19061b17591c3a2310348033eb51194f5a9a4527
src/page/trading/buy.vue
@@ -228,6 +228,7 @@
<script>
import * as api from "@/axios/api";
import { mapActions } from "vuex";
export default {
  name: "trBuy",
@@ -313,7 +314,7 @@
    } else if (this.bayType == "qh") {
      this.priceTabs = [this.$t("hj108")];
    }
    this.getUserInfo();
    this.setUseInfo();
    this.getMoneyData();
    this.getSettingInfo();
  },
@@ -332,6 +333,8 @@
    },
  },
  methods: {
    ...mapActions(["setUseInfo"]),
    async getMoneyData() {
      let data = await api.getMoney();
      let type = this.bayType === "SZHB" ? "US" : this.bayType;
@@ -476,15 +479,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,18 +533,17 @@
          elAlertType: "success",
        });
        this.getUserInfo();
        var buyType = ''
        var buyType = "";
        if (this.tabsCurrentIndex == 0) {
          buyType = 1;
        } else {
          buyType = 0;
        }
        if(this.bayType=='US'){
          this.$router.push("/warehouse?index=1&buyType="+buyType);
        }else if(this.bayType=='MAS'){
          this.$router.push("/warehouse?index=0&buyType="+buyType);
        }else {
        if (this.bayType == "US") {
          this.$router.push("/warehouse?index=1&buyType=" + buyType);
        } else if (this.bayType == "MAS") {
          this.$router.push("/warehouse?index=0&buyType=" + buyType);
        } else {
          this.$router.push("/warehouse");
        }
      } else {