| | |
| | | <div class="mt-40 mb-30 w-full flex justify-between items-center"> |
| | | <span class="font-22 font-400 text-grey">{{ |
| | | $t("可开张数") |
| | | }}</span>{{form.lever_rate}} |
| | | <span class="font-22 font-400 textColor" v-if="form.lever_rate==25"> |
| | | {{Math.floor((initFutrue.amount-(initFutrue.amount * 0.0375))/initData.amount)}} |
| | | }}</span |
| | | >{{ form.lever_rate }} |
| | | <span |
| | | class="font-22 font-400 textColor" |
| | | v-if="form.lever_rate == 25" |
| | | > |
| | | {{ |
| | | Math.floor( |
| | | (initFutrue.amount - initFutrue.amount * 0.0375) / |
| | | initData.amount |
| | | ) |
| | | }} |
| | | {{ $t("张") }} |
| | | </span> |
| | | <span class="font-22 font-400 textColor" v-if="form.lever_rate==50"> |
| | | {{Math.floor((initFutrue.amount-(initFutrue.amount * 0.075))/initData.amount)}} |
| | | {{ $t("张") }} |
| | | </span> |
| | | <span class="font-22 font-400 textColor" v-if="form.lever_rate==100"> |
| | | {{Math.floor((initFutrue.amount-(initFutrue.amount * 0.15))/initData.amount)}} |
| | | {{ $t("张") }} |
| | | </span> |
| | | <span class="font-22 font-400 textColor" v-if="form.lever_rate==200"> |
| | | {{Math.floor((initFutrue.amount-(initFutrue.amount * 0.30))/initData.amount)}} |
| | | {{ $t("张") }} |
| | | </span> |
| | | <span |
| | | class="font-22 font-400 textColor" |
| | | v-if="form.lever_rate == 50" |
| | | > |
| | | {{ |
| | | Math.floor( |
| | | (initFutrue.amount - initFutrue.amount * 0.075) / |
| | | initData.amount |
| | | ) |
| | | }} |
| | | {{ $t("张") }} |
| | | </span> |
| | | <span |
| | | class="font-22 font-400 textColor" |
| | | v-if="form.lever_rate == 100" |
| | | > |
| | | {{ |
| | | Math.floor( |
| | | (initFutrue.amount - initFutrue.amount * 0.15) / |
| | | initData.amount |
| | | ) |
| | | }} |
| | | {{ $t("张") }} |
| | | </span> |
| | | <span |
| | | class="font-22 font-400 textColor" |
| | | v-if="form.lever_rate == 200" |
| | | > |
| | | {{ |
| | | Math.floor( |
| | | (initFutrue.amount - initFutrue.amount * 0.3) / |
| | | initData.amount |
| | | ) |
| | | }} |
| | | {{ $t("张") }} |
| | | </span> |
| | | </div> |
| | | <!-- <vue-slider v-bind="options" v-model="form.amount"></vue-slider> --> |
| | | <!-- <vue-slider class="mainBox" v-bind="options" :marks="marks" v-model="form.volume" :hide-label="true" width="90%" |
| | |
| | | <div class="flex justify-between mt-30"> |
| | | <div class="text-grey">{{ $t("合约金额") }}</div> |
| | | <div class="textColor"> |
| | | {{ ((initData.amount * (form.amount / 1) * form.lever_rate)).toFixed(4)}} USDT |
| | | {{ |
| | | ( |
| | | initData.amount * |
| | | (form.amount / 1) * |
| | | form.lever_rate |
| | | ).toFixed(4) |
| | | }} |
| | | USDT |
| | | </div> |
| | | </div> |
| | | <div class="flex justify-between mt-30"> |
| | | <div class="text-grey">{{ $t("保证金") }}</div> |
| | | <div class="textColor"> |
| | | {{ ((initData.amount * (form.amount / 1)) | nan).toFixed(4) }} USDT |
| | | {{ ((initData.amount * (form.amount / 1)) | nan).toFixed(4) }} |
| | | USDT |
| | | </div> |
| | | </div> |
| | | <div class="flex justify-between mt-30"> |
| | | <div class="text-grey">{{ $t("建仓手续费") }}</div> |
| | | <!-- {{ |
| | | <!-- {{ |
| | | userInfo.perpetual_contracts_status === "1" |
| | | ? initData.fee * (form.amount / 1) |
| | | : (initData.fee * (form.amount / 1) * form.lever_rate) | nan |
| | | }} --> |
| | | <div class="textColor" v-if="form.lever_rate==25"> |
| | | {{ ((initData.amount * (form.amount / 1)) * 0.0375).toFixed(4)}} |
| | | <div class="textColor" v-if="form.lever_rate == 25"> |
| | | {{ (initData.amount * (form.amount / 1) * 0.0375).toFixed(4) }} |
| | | USDT |
| | | </div> |
| | | <div class="textColor" v-if="form.lever_rate==50"> |
| | | {{ ((initData.amount * (form.amount / 1))* 0.075).toFixed(4)}} |
| | | USDT |
| | | </div> |
| | | <div class="textColor" v-if="form.lever_rate==100"> |
| | | {{ ((initData.amount * (form.amount / 1))* 0.15).toFixed(4)}} |
| | | USDT |
| | | </div> |
| | | <div class="textColor" v-if="form.lever_rate==200"> |
| | | {{ ((initData.amount * (form.amount / 1)) * 0.30).toFixed(4)}} |
| | | USDT |
| | | </div> |
| | | <div class="textColor" v-if="form.lever_rate == 50"> |
| | | {{ (initData.amount * (form.amount / 1) * 0.075).toFixed(4) }} |
| | | USDT |
| | | </div> |
| | | <div class="textColor" v-if="form.lever_rate == 100"> |
| | | {{ (initData.amount * (form.amount / 1) * 0.15).toFixed(4) }} |
| | | USDT |
| | | </div> |
| | | <div class="textColor" v-if="form.lever_rate == 200"> |
| | | {{ (initData.amount * (form.amount / 1) * 0.3).toFixed(4) }} |
| | | USDT |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <div |
| | |
| | | title: this.$t("市价"), |
| | | type: "1", |
| | | }, |
| | | { |
| | | title: this.$t("限价"), |
| | | type: "2", |
| | | }, |
| | | // { |
| | | // title: this.$t("限价"), |
| | | // type: "2", |
| | | // }, |
| | | ], |
| | | form: { |
| | | symbol: "", // 币种 |
| | |
| | | title: this.$t("市价"), |
| | | type: "1", |
| | | }, |
| | | { |
| | | title: this.$t("限价"), |
| | | type: "2", |
| | | }, |
| | | // { |
| | | // title: this.$t("限价"), |
| | | // type: "2", |
| | | // }, |
| | | ]; |
| | | this.title = this.selectData[0].title; |
| | | this.type = this.selectData[0].type; |
| | |
| | | //获取张数 |
| | | getAmount(val) { |
| | | this.form.amount = val; |
| | | // if(this.form.lever_rate==25){ |
| | | // this.form.amount = Math.floor((this.initFutrue.amount-(this.initFutrue.amount * 0.0375))/this.initData.amount) |
| | | // }else if(this.form.lever_rate==50){ |
| | | // this.form.amount = Math.floor((this.initFutrue.amount-(this.initFutrue.amount * 0.0375))/this.initData.amount) |
| | | // }else if(this.form.lever_rate==100){ |
| | | // this.form.amount = Math.floor((this.initFutrue.amount-(this.initFutrue.amount * 0.15))/this.initData.amount) |
| | | // }else{ |
| | | // this.form.amount = Math.floor((this.initFutrue.amount-(this.initFutrue.amount * 0.3))/this.initData.amount) |
| | | // } |
| | | // if(this.form.lever_rate==25){ |
| | | // this.form.amount = Math.floor((this.initFutrue.amount-(this.initFutrue.amount * 0.0375))/this.initData.amount) |
| | | // }else if(this.form.lever_rate==50){ |
| | | // this.form.amount = Math.floor((this.initFutrue.amount-(this.initFutrue.amount * 0.0375))/this.initData.amount) |
| | | // }else if(this.form.lever_rate==100){ |
| | | // this.form.amount = Math.floor((this.initFutrue.amount-(this.initFutrue.amount * 0.15))/this.initData.amount) |
| | | // }else{ |
| | | // this.form.amount = Math.floor((this.initFutrue.amount-(this.initFutrue.amount * 0.3))/this.initData.amount) |
| | | // } |
| | | }, |
| | | // 获取张数,数据转换 |
| | | getVolumnByLever() { |
| | | let vol; |
| | | // vol = this.initOpen.volume / 1; |
| | | if(this.form.lever_rate==25){ |
| | | vol = Math.floor((this.initFutrue.amount-(this.initFutrue.amount * 0.0375))/this.initData.amount) |
| | | }else if(this.form.lever_rate==50){ |
| | | vol = Math.floor((this.initFutrue.amount-(this.initFutrue.amount * 0.0375))/this.initData.amount) |
| | | }else if(this.form.lever_rate==100){ |
| | | vol = Math.floor((this.initFutrue.amount-(this.initFutrue.amount * 0.15))/this.initData.amount) |
| | | }else{ |
| | | vol = Math.floor((this.initFutrue.amount-(this.initFutrue.amount * 0.3))/this.initData.amount) |
| | | } |
| | | if (this.form.lever_rate == 25) { |
| | | vol = Math.floor( |
| | | (this.initFutrue.amount - this.initFutrue.amount * 0.0375) / |
| | | this.initData.amount |
| | | ); |
| | | } else if (this.form.lever_rate == 50) { |
| | | vol = Math.floor( |
| | | (this.initFutrue.amount - this.initFutrue.amount * 0.0375) / |
| | | this.initData.amount |
| | | ); |
| | | } else if (this.form.lever_rate == 100) { |
| | | vol = Math.floor( |
| | | (this.initFutrue.amount - this.initFutrue.amount * 0.15) / |
| | | this.initData.amount |
| | | ); |
| | | } else { |
| | | vol = Math.floor( |
| | | (this.initFutrue.amount - this.initFutrue.amount * 0.3) / |
| | | this.initData.amount |
| | | ); |
| | | } |
| | | return Math.floor(vol); |
| | | }, |
| | | |