| | |
| | | <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')" |
| | |
| | | </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 |
| | |
| | | <span> |
| | | {{ $t("hj54") }} |
| | | </span> |
| | | <a> ﷼{{ enableAmt | _toString }}</a> |
| | | <a> {{ enableAmt | _toString }}</a> |
| | | </p> |
| | | <div class="maik" @click="getxiadan">{{ $t("hj85") }}</div> |
| | | </div> |
| | |
| | | |
| | | 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() { |
| | |
| | | dzId: this.currentItem.id, |
| | | password: this.password, |
| | | num: this.num, |
| | | buyingType: "dz", |
| | | buyingType: "dz" |
| | | }; |
| | | let res = await buyStockDz(opt); |
| | | console.log(res, "======"); |
| | |
| | | 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(); |
| | |
| | | num: "", |
| | | password: "", |
| | | currentItem: {}, |
| | | enableAmt: "", |
| | | enableAmt: "" |
| | | }; |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |