123
dcc
2024-07-10 8d266864fc30d12419dac13b9f34544004a74c0e
123
4 files modified
36 ■■■■ changed files
src/locales/en.json 3 ●●●● patch | view | raw | blame | history
src/locales/hi.json 3 ●●●● patch | view | raw | blame | history
src/locales/zh.json 3 ●●●● patch | view | raw | blame | history
src/page/trading/buy.vue 27 ●●●●● patch | view | raw | blame | history
src/locales/en.json
@@ -582,5 +582,6 @@
  "当前委托": "Current Commission",
  "撤销挂单": "Cancel pending order",
  "立即购买": "Buy it now",
  "秘钥": "Secret key"
  "秘钥": "Secret key",
  "购买申请成功": "Purchase application successful"
}
src/locales/hi.json
@@ -581,5 +581,6 @@
  "当前委托": "अभी का ऑर्डर",
  "撤销挂单": "लंबित आदेश रद्द करें",
  "立即购买": "इसे अभी खरीदें",
  "秘钥": "गुप्त कुंजी"
  "秘钥": "गुप्त कुंजी",
  "购买申请成功": "खरीदारी आवेदन सफल"
}
src/locales/zh.json
@@ -571,5 +571,6 @@
  "当前委托": "当前委托",
  "撤销挂单": "撤销挂单",
  "立即购买": "立即购买",
  "秘钥": "秘钥"
  "秘钥": "秘钥",
  "购买申请成功": "购买申请成功"
}
src/page/trading/buy.vue
@@ -244,8 +244,10 @@
</template>
<script>
import { ActionSheet } from "vant";
import * as api from "@/axios/api";
import { mapActions } from "vuex";
import { Notify } from "vant";
export default {
  name: "trBuy",
@@ -515,11 +517,31 @@
    },
    async checkcheckStockVip() {
      // this.$refs.closeDialog.show = true;
      let data = await api.checkStockVip({ stockCode: this.code });
      const opts = {
        stockId: this.id,
        buyNum: this.num,
        lever: this.selectLever,
      }
      if (this.checkedZs) {
        opts.stopLoss = this.zhisun;
      }
      if (this.checkedZy) {
        opts.profitTarget = this.profitTarget;
      }
      if (this.tabsCurrentIndex == 0) {
        opts.buyType = 1;
      } else {
        opts.buyType = 0;
      }
      let data = await api.checkStockVip(opts);
      console.log(data, "data");
      if (!data.data) {
      if (data.data == 0) {
        this.password = "";
        this.setBuy();
      } else if (data.data == 1) {
        this.password = "";
        Notify({ type: "success", message: this.$t("购买申请成功") });
        this.$router.push("/warehouse?index=1&buyType=" + this.bayType);
      } else {
        this.show = true;
      }
@@ -750,6 +772,7 @@
      }
    },
  },
  components: { ActionSheet, [Notify.Component.name]: Notify.Component },
};
</script>