| | |
| | | </div> |
| | | <div class="rights"> |
| | | <div class="ese"> |
| | | <div |
| | | class="mc" |
| | | @click="handleTradingClick(0)" |
| | | :class="tabsCurrentIndex === 0 ? 'actives' : ''" |
| | | > |
| | | <div class="mc" @click="handleTradingClick(0)" :class="tabsCurrentIndex === 0 ? 'actives' : ''"> |
| | | <span>{{ $t("hj84") }}</span> |
| | | </div> |
| | | |
| | | <div |
| | | class="mr" |
| | | @click="handleTradingClick(1)" |
| | | :class="tabsCurrentIndex === 1 ? 'active' : ''" |
| | | > |
| | | <div class="mr" @click="handleTradingClick(1)" :class="tabsCurrentIndex === 1 ? 'active' : ''"> |
| | | <span>{{ $t("hj85") }}</span> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <div class="price_tabs"> |
| | | <div class="tabs"> |
| | | <div |
| | | class="tab_item" |
| | | v-for="(item, index) in priceTabs" |
| | | :key="index" |
| | | @click="handleTabsClick(item, index)" |
| | | :class="priceTabsCurrentIndex === index ? 'active' : ''" |
| | | > |
| | | <div class="tab_item" v-for="(item, index) in priceTabs" :key="index" @click="handleTabsClick(item, index)" |
| | | :class="priceTabsCurrentIndex === index ? 'active' : ''"> |
| | | <span>{{ item }}</span> |
| | | </div> |
| | | </div> |
| | |
| | | <img src="@/assets/img/ic_number_jian.png" alt /> |
| | | </div> |
| | | <div class="addorj"></div> |
| | | <div |
| | | class="addorj" |
| | | @click=" |
| | | <div class="addorj" @click=" |
| | | typeof nums == 'string' |
| | | ? (nums = Number(Number(nums) + 1).toFixed(2)) |
| | | : (nums = (Number(nums) + 1).toFixed(2)) |
| | | " |
| | | > |
| | | "> |
| | | <img src="@/assets/img/ic_number_add.png" /> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="tr_es flexJy"> |
| | | <div class="top_input"> |
| | | <input |
| | | type="number" |
| | | onkeyup="value=value.replace(/[^\d]/g,'')" |
| | | v-model="num" |
| | | @input="numInput" |
| | | /> |
| | | <input type="number" onkeyup="value=value.replace(/[^\d]/g,'')" v-model="num" @input="numInput" /> |
| | | </div> |
| | | <div class="right_sw flexJy" style="width: auto"> |
| | | <div class="addorj" @click="jyslJian"> |
| | |
| | | </div> |
| | | <div class="zy" v-show="checkedZy"> |
| | | <div class="left_zy"> |
| | | <input |
| | | v-model="profitTarget" |
| | | onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" |
| | | @input="zyInt" |
| | | /> |
| | | <input v-model="profitTarget" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" |
| | | @input="zyInt" /> |
| | | </div> |
| | | <div class="right_sw" style="width: auto"> |
| | | <div class="addorj" @click="zYjian"> |
| | | <img src="@/assets/img/ic_number_jian.png" /> |
| | | </div> |
| | | <div class="addorj"></div> |
| | | <div |
| | | class="addorj" |
| | | @click="profitTarget = (Number(profitTarget) + 1).toFixed(2)" |
| | | > |
| | | <div class="addorj" |
| | | @click="tabsCurrentIndex==0?profitTarget = (Number(profitTarget) + 1).toFixed(2):profitTarget = (Number(profitTarget) + 1).toFixed(2)"> |
| | | <img src="@/assets/img/ic_number_add.png" /> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="zy" v-show="checkedZs"> |
| | | <div class="left_zy"> |
| | | <input |
| | | v-model="zhisun" |
| | | onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" |
| | | @input="zsInt" |
| | | /> |
| | | <input v-model="zhisun" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" @input="zsInt" /> |
| | | </div> |
| | | <div class="right_sw" style="width: auto"> |
| | | <div class="addorj" @click="zhisun--"> |
| | | <div class="addorj" |
| | | @click="zSjian"> |
| | | <img src="@/assets/img/ic_number_jian.png" /> |
| | | </div> |
| | | <div class="addorj"></div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <van-action-sheet |
| | | v-model="showGg" |
| | | :actions="siteLeverList" |
| | | :cancel-text="$t('hj106')" |
| | | :description="$t('hj107')" |
| | | close-on-click-action |
| | | @select="onSelect" |
| | | /> |
| | | <van-action-sheet v-model="showGg" :actions="siteLeverList" :cancel-text="$t('hj106')" :description="$t('hj107')" |
| | | close-on-click-action @select="onSelect" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as api from "@/axios/api"; |
| | | import { mapActions } from "vuex"; |
| | | import { |
| | | mapActions |
| | | } from "vuex"; |
| | | |
| | | export default { |
| | | name: "trBuy", |
| | |
| | | if_us: 0, |
| | | bayType: "", |
| | | id: "", |
| | | actions: [ |
| | | { name: "100X", subname: this.$t("hj102") }, |
| | | { name: "200X", subname: this.$t("hj102") }, |
| | | { name: "300X", subname: this.$t("hj102") }, |
| | | ], |
| | | profitArr: [ |
| | | actions: [{ |
| | | name: "100X", |
| | | subname: this.$t("hj102") |
| | | }, |
| | | { |
| | | name: "200X", |
| | | subname: this.$t("hj102") |
| | | }, |
| | | { |
| | | name: "300X", |
| | | subname: this.$t("hj102") |
| | | }, |
| | | ], |
| | | profitArr: [{ |
| | | name: this.$t("hj104"), |
| | | checked: false, |
| | | }, |
| | |
| | | gid: "", |
| | | }; |
| | | }, |
| | | |
| | | mounted() { |
| | | this.bayType = this.$route.query.bayType; |
| | | this.gid = this.$route.query.gid; |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | zSjian(){ |
| | | var newzishu = (Number(this.zhisun)-1).toFixed(2) |
| | | if(Number(newzishu)<1){ |
| | | |
| | | }else{ |
| | | this.zhisun = newzishu |
| | | } |
| | | }, |
| | | ...mapActions(["setUseInfo"]), |
| | | numInput(e) { |
| | | // this.nowPrice / this.selectCycle.replace("X", "") |
| | |
| | | } |
| | | // if() |
| | | console.log(e.target.value); |
| | | }, |
| | | handleDoubleClick(event) { |
| | | console.log(1); |
| | | // console.log('Input field was double-clicked', event); |
| | | }, |
| | | async getMoneyData() { |
| | | let data = await api.getMoney(); |
| | |
| | | this.nowPrice / |
| | | this.selectCycle.replace("X", "") |
| | | ); |
| | | typeof this.num == "string" |
| | | ? (this.num = Number(Number(this.num) + 1)) |
| | | : (this.num = Number(Number(this.num) + 1)); |
| | | 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) { |
| | |
| | | } |
| | | }, |
| | | zYjian() { |
| | | if ((Number(this.profitTarget) - 1).toFixed(2) < this.nowPrice) { |
| | | this.profitTarget = this.nowPrice; |
| | | var newzishu = (Number(this.profitTarget)-1).toFixed(2) |
| | | if(Number(newzishu)<1){ |
| | | |
| | | } else { |
| | | this.profitTarget = (Number(this.profitTarget) - 1).toFixed(2); |
| | | this.profitTarget = newzishu |
| | | } |
| | | // this.profitTarget = (Number(this.profitTarget) - 1).toFixed(2); |
| | | // if(this.tabsCurrentIndex==0){ |
| | | // console.log( this.nowPrice); |
| | | // if ((Number(this.profitTarget) - 1).toFixed(2) < this.nowPrice) { |
| | | // this.profitTarget = (Number(this.profitTarget) - 1).toFixed(2); |
| | | // } else { |
| | | // this.profitTarget = this.nowPrice; |
| | | // } |
| | | // }else{ |
| | | // console.log(123); |
| | | // if ((Number(this.profitTarget) - 1).toFixed(2) < this.nowPrice) { |
| | | // this.profitTarget = this.nowPrice; |
| | | // } else { |
| | | // this.profitTarget = (Number(this.profitTarget) - 1).toFixed(2); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | }, |
| | | zSjia() { |
| | | if ((Number(this.zhisun) + 1).toFixed(2) > this.nowPrice) { |
| | | this.zhisun = this.nowPrice; |
| | | } else { |
| | | this.zhisun++; |
| | | } |
| | | // if ((Number(this.zhisun) + 1).toFixed(2) > this.nowPrice) { |
| | | // this.zhisun = this.nowPrice; |
| | | // } else { |
| | | // this.zhisun++; |
| | | // } |
| | | }, |
| | | zsInt(e) { |
| | | if (typeof e.target.value === "string") { |
| | |
| | | }, |
| | | gdOrSetBuy() { |
| | | if (this.priceTabsCurrentIndex == 0) { |
| | | |
| | | this.setBuy(); |
| | | } else { |
| | | |
| | | this.gdBuy(); |
| | | } |
| | | if (navigator.vibrate) { |
| | |
| | | |
| | | this.siteLeverList = []; |
| | | for ( |
| | | let i = 0; |
| | | i < this.$store.state.userInfo.siteLever.split("/").length; |
| | | i++ |
| | | let i = 0; i < this.$store.state.userInfo.siteLever.split("/").length; i++ |
| | | ) { |
| | | let val = this.$store.state.userInfo.siteLever.split("/")[i]; |
| | | let item = { label: val, name: val + "X" }; |
| | | let item = { |
| | | label: val, |
| | | name: val + "X" |
| | | }; |
| | | this.siteLeverList.push(item); |
| | | } |
| | | console.log(this.siteLeverList, " this.selectCycle"); |
| | |
| | | transform: skew(-10deg, 0deg); |
| | | } |
| | | } |
| | | |
| | | /deep/.van-overlay { |
| | | z-index: 10000 !important; |
| | | } |