lxf
2025-04-30 b4c4556a5eddf6708ec55b07e3edc15b2217842e
src/page/list/tradingList/dazy.vue
@@ -7,7 +7,7 @@
          <span @click="show = false"></span>
        </div>
        <h5>{{ $t("hj130") }}</h5>
        <h6> ﷼{{ currentItem.nowPrice | _toString }}</h6>
        <h6>{{ currentItem.nowPrice | _toString }}</h6>
        <div class="erty tghj">
          <input
            :placeholder="$t('hj262')"
@@ -21,7 +21,7 @@
        </div>
        <p class="plm">
          <span>{{ $t("hj263") }}</span>
          <a> ﷼{{ currentItem.nowPrice*num | _toString }}</a>
          <a> {{ (currentItem.nowPrice * num) | _toString }}</a>
        </p>
        <div class="erty" v-if="currentItem.password">
          <input
@@ -35,7 +35,7 @@
          <span>
            {{ $t("hj54") }}
          </span>
          <a> ﷼{{ enableAmt | _toString }}</a>
          <a> {{ enableAmt | _toString }}</a>
        </p>
        <div class="maik" @click="getxiadan">{{ $t("hj85") }}</div>
      </div>
@@ -48,11 +48,11 @@
export default {
  methods: {
    priceinput(e){
      this.num = this.num.replace(/^(0+)|[^\d]+/g, '')
      var maxnum = this.enableAmt/this.currentItem.nowPrice
      if(this.num>=maxnum){
        this.num = Math.floor(maxnum)
    priceinput(e) {
      this.num = this.num.replace(/^(0+)|[^\d]+/g, "");
      var maxnum = this.enableAmt / this.currentItem.nowPrice;
      if (this.num >= maxnum) {
        this.num = Math.floor(maxnum);
      }
    },
    async getxiadan() {
@@ -72,7 +72,7 @@
        dzId: this.currentItem.id,
        password: this.password,
        num: this.num,
        buyingType: "dz",
        buyingType: "dz"
      };
      let res = await buyStockDz(opt);
      console.log(res, "======");
@@ -89,9 +89,9 @@
    async getenableAmt() {
      const res = await getMoney();
      const data = res.data.filter((item) => item.accectType === "ALL");
      const data = res.data.filter(item => item.accectType === "ALL");
      this.enableAmt = data[0].availableBalance;
    },
    }
  },
  mounted() {
    this.getenableAmt();
@@ -102,9 +102,9 @@
      num: "",
      password: "",
      currentItem: {},
      enableAmt: "",
      enableAmt: ""
    };
  },
  }
};
</script>