| | |
| | | type="number" |
| | | onkeyup="value=value.replace(/[^\d]/g,'')" |
| | | v-model="num" |
| | | @input="numInput" |
| | | /> |
| | | </div> |
| | | <div class="right_sw flexJy" style="width: auto"> |
| | |
| | | <img src="@/assets/img/ic_number_jian.png" /> |
| | | </div> |
| | | <div class="addorj"></div> |
| | | <div |
| | | class="addorj" |
| | | @click=" |
| | | typeof num == 'string' |
| | | ? (num = Number(Number(num) + 1)) |
| | | : (num = Number(Number(num) + 1)) |
| | | " |
| | | > |
| | | <div class="addorj" @click="jjjisua"> |
| | | <img src="@/assets/img/ic_number_add.png" /> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | |
| | | <div class="bottom_bzz"> |
| | | <span>{{ ((nowPrice / selectCycle) * num) | _toLocaleString }}</span> |
| | | <span> |
| | | {{ |
| | | ((nowPrice / selectCycle.replace("X", "")) * num) |
| | | | _toLocaleString |
| | | }} |
| | | </span> |
| | | <span style="white-space: nowarp"> |
| | | <!-- moneyData.symbol + " " + --> |
| | | |
| | | {{ moneyData.availableBalance | _toLocaleString }} |
| | | </span> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="zy"> |
| | | <div class="left_zy"> |
| | | <span>追踪止损</span> |
| | | </div> |
| | | <div class="right_sw"> |
| | | <van-switch v-model="profitArr[2].checked" /> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <div class="btn_buy" @click="gdOrSetBuy()"> |
| | | <div :class="tabsCurrentIndex == 0 ? 'maichu' : ''"> |
| | |
| | | }, |
| | | methods: { |
| | | ...mapActions(["setUseInfo"]), |
| | | |
| | | numInput(e) { |
| | | // this.nowPrice / this.selectCycle.replace("X", "") |
| | | // this.moneyData.availableBalance |
| | | let numbs = Math.floor( |
| | | this.moneyData.availableBalance / |
| | | this.nowPrice / |
| | | this.selectCycle.replace("X", "") |
| | | ); |
| | | if (e.target.value >= numbs) { |
| | | this.num = numbs; |
| | | } |
| | | // if() |
| | | console.log(e.target.value); |
| | | }, |
| | | async getMoneyData() { |
| | | let data = await api.getMoney(); |
| | | let type = this.bayType === "SZHB" ? "US" : this.bayType; |
| | |
| | | handleTabsClick(item, index) { |
| | | this.priceTabsCurrentIndex = index; |
| | | }, |
| | | jjjisua() { |
| | | let numbs = Math.floor( |
| | | this.moneyData.availableBalance / |
| | | this.nowPrice / |
| | | this.selectCycle.replace("X", "") |
| | | ); |
| | | typeof this.num == "string" |
| | | ? (this.num = Number(Number(this.num) + 1)) |
| | | : (this.num = Number(Number(this.num) + 1)); |
| | | |
| | | console.log(this.num, numbs); |
| | | if (this.num >= numbs) { |
| | | this.num = numbs; |
| | | } |
| | | }, |
| | | jyslJian() { |
| | | if (typeof this.num === "string") { |
| | | this.num = 1; |