|
|
|
@ -756,7 +756,7 @@ export default { |
|
|
|
type: 1, |
|
|
|
entrust_price: "", |
|
|
|
amount: "", |
|
|
|
lever_rate: "", |
|
|
|
lever_rate: 50, |
|
|
|
tp_trigger_price: "", |
|
|
|
sl_trigger_price: "", |
|
|
|
}, |
|
|
|
@ -782,6 +782,7 @@ export default { |
|
|
|
progress:[25,50,75,100], |
|
|
|
progressPing:[25,50,75,100], |
|
|
|
sliderActive:-1, |
|
|
|
sliderActive1:0, |
|
|
|
pingActive:3, |
|
|
|
contract:"1", |
|
|
|
// contract:"0", |
|
|
|
@ -860,6 +861,10 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
maxNum(n){ |
|
|
|
this.form.amount = Math.round((this.maxNum * this.sliderActive1) / 100); |
|
|
|
this.margin=this.form.amount/this.form.lever_rate |
|
|
|
}, |
|
|
|
symbol() { |
|
|
|
this.$emit("symbols",this.symbol) |
|
|
|
if (this.unSymbol) { |
|
|
|
@ -1337,18 +1342,21 @@ export default { |
|
|
|
} |
|
|
|
Contract.openPosition(data, { btn }).then(() => { |
|
|
|
this.$toast(this.$t("contract.g2")); |
|
|
|
console.info(this.form.type) |
|
|
|
if(this.form.type==1){ |
|
|
|
this.holdPosition() |
|
|
|
}else{ |
|
|
|
this.getCurrentEntrust() |
|
|
|
} |
|
|
|
this.contractAccount(); |
|
|
|
this.openNum() |
|
|
|
}); |
|
|
|
}, |
|
|
|
sliderChange(n,i) { |
|
|
|
console.info(n,i) |
|
|
|
this.form.amount = Math.round((this.maxNum * n) / 100); |
|
|
|
this.sliderActive=i |
|
|
|
|
|
|
|
this.sliderActive1=n |
|
|
|
this.margin=this.form.amount/this.form.lever_rate |
|
|
|
}, |
|
|
|
pingChange(n,i) { |
|
|
|
@ -1467,6 +1475,7 @@ export default { |
|
|
|
this.pingAmount = ""; |
|
|
|
this.holdPosition(); |
|
|
|
this.$toast(res.message); |
|
|
|
this.openNum() |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 一键平仓 |
|
|
|
@ -1536,6 +1545,7 @@ export default { |
|
|
|
Contract.onekeyAllFlat({}).then(() => { |
|
|
|
this.holdPosition(true); |
|
|
|
this.$toast(this.$t("contract.l0")); |
|
|
|
this.openNum() |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
@ -1820,4 +1830,4 @@ export default { |
|
|
|
.but_text{ |
|
|
|
font-size: 14px; |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style>s |