|
|
@ -845,8 +845,8 @@ export default { |
|
|
// ); |
|
|
// ); |
|
|
// }, |
|
|
// }, |
|
|
amount(){ |
|
|
amount(){ |
|
|
console.info(this.form.lever_rate) |
|
|
// console.info(this.form.lever_rate) |
|
|
console.info(this.margin) |
|
|
// console.info(this.margin) |
|
|
if (!this.form.lever_rate || !this.margin) return 0; |
|
|
if (!this.form.lever_rate || !this.margin) return 0; |
|
|
let p=this.margin*this.form.lever_rate; |
|
|
let p=this.margin*this.form.lever_rate; |
|
|
p = p.toFixed(0) |
|
|
p = p.toFixed(0) |
|
|
@ -1260,7 +1260,7 @@ export default { |
|
|
this.buyList = res.data.swapBuyList; |
|
|
this.buyList = res.data.swapBuyList; |
|
|
this.tradeList = res.data.swapTradeList; |
|
|
this.tradeList = res.data.swapTradeList; |
|
|
this.newPrice = this.tradeList[0] || {}; |
|
|
this.newPrice = this.tradeList[0] || {}; |
|
|
console.info(this.newPrice) |
|
|
// console.info(this.newPrice) |
|
|
this.form.entrust_price = this.newPrice.price; |
|
|
this.form.entrust_price = this.newPrice.price; |
|
|
this.linkSocket(data.symbol); |
|
|
this.linkSocket(data.symbol); |
|
|
}); |
|
|
}); |
|
|
@ -1292,7 +1292,7 @@ export default { |
|
|
symbol: this.symbolLeft, |
|
|
symbol: this.symbolLeft, |
|
|
}; |
|
|
}; |
|
|
Contract.getSymbolDetail(data).then((res) => { |
|
|
Contract.getSymbolDetail(data).then((res) => { |
|
|
console.info('res.data', res.data.default_lever, res.data.lever_rage, res) |
|
|
// console.info('res.data', res.data.default_lever, res.data.lever_rage, res) |
|
|
this.unit_amount = res.data.unit_amount; |
|
|
this.unit_amount = res.data.unit_amount; |
|
|
|
|
|
|
|
|
// if (!this.lever_rage.length) { |
|
|
// if (!this.lever_rage.length) { |
|
|
@ -1375,7 +1375,7 @@ export default { |
|
|
} |
|
|
} |
|
|
Contract.openPosition(data, { btn }).then(() => { |
|
|
Contract.openPosition(data, { btn }).then(() => { |
|
|
this.$toast(this.$t("contract.g2")); |
|
|
this.$toast(this.$t("contract.g2")); |
|
|
console.info(this.form.type) |
|
|
// console.info(this.form.type) |
|
|
if(this.form.type==1){ |
|
|
if(this.form.type==1){ |
|
|
this.holdPosition() |
|
|
this.holdPosition() |
|
|
}else{ |
|
|
}else{ |
|
|
@ -1386,14 +1386,14 @@ export default { |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
sliderChange(n,i) { |
|
|
sliderChange(n,i) { |
|
|
console.info(n,i) |
|
|
// console.info(n,i) |
|
|
this.form.amount = Math.round((this.maxNum * n) / 100); |
|
|
this.form.amount = Math.round((this.maxNum * n) / 100); |
|
|
this.sliderActive=i |
|
|
this.sliderActive=i |
|
|
this.sliderActive1=n |
|
|
this.sliderActive1=n |
|
|
this.margin=(this.form.amount/this.form.lever_rate) |
|
|
this.margin=(this.form.amount/this.form.lever_rate) |
|
|
}, |
|
|
}, |
|
|
pingChange(n,i) { |
|
|
pingChange(n,i) { |
|
|
console.log(n) |
|
|
// console.log(n) |
|
|
this.pingAmount = Math.round((this.activeItem.avail_position * n) / 100); |
|
|
this.pingAmount = Math.round((this.activeItem.avail_position * n) / 100); |
|
|
this.pingActive=i |
|
|
this.pingActive=i |
|
|
}, |
|
|
}, |
|
|
|