|
|
|
@ -1044,8 +1044,8 @@ export default { |
|
|
|
// ); |
|
|
|
// }, |
|
|
|
amount() { |
|
|
|
console.info(this.form.lever_rate) |
|
|
|
console.info(this.margin) |
|
|
|
// console.info(this.form.lever_rate) |
|
|
|
// console.info(this.margin) |
|
|
|
if (!this.form.lever_rate || !this.margin) return 0; |
|
|
|
let p = this.margin * this.form.lever_rate; |
|
|
|
p = p.toFixed(0) |
|
|
|
@ -1443,7 +1443,7 @@ export default { |
|
|
|
this.buyList = res.data.swapBuyList; |
|
|
|
this.tradeList = res.data.swapTradeList; |
|
|
|
this.newPrice = this.tradeList[0] || {}; |
|
|
|
console.info(this.newPrice) |
|
|
|
// console.info(this.newPrice) |
|
|
|
this.form.entrust_price = this.newPrice.price; |
|
|
|
this.linkSocket(data.symbol); |
|
|
|
}); |
|
|
|
@ -1475,7 +1475,7 @@ export default { |
|
|
|
symbol: this.symbolLeft, |
|
|
|
}; |
|
|
|
Contract.getSymbolDetail(data).then((res) => { |
|
|
|
console.info('res.data', res.data.default_lever, res.data.lever_rage) |
|
|
|
// console.info('res.data', res.data.default_lever, res.data.lever_rage) |
|
|
|
this.unit_amount = res.data.unit_amount; |
|
|
|
|
|
|
|
this.lever_rage = res.data.lever_rage.map((item) => ({ |
|
|
|
@ -1559,7 +1559,7 @@ export default { |
|
|
|
} |
|
|
|
Contract.openPosition(data, {btn}).then(() => { |
|
|
|
this.$toast(this.$t("contract.g2")); |
|
|
|
console.info(this.form.type) |
|
|
|
// console.info(this.form.type) |
|
|
|
if (this.form.type == 1) { |
|
|
|
this.holdPosition() |
|
|
|
} else { |
|
|
|
@ -1570,7 +1570,7 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
sliderChange(n, i) { |
|
|
|
console.info(n, i) |
|
|
|
// console.info(n, i) |
|
|
|
this.form.amount = Math.round((this.maxNum * n) / 100); |
|
|
|
this.sliderActive = i |
|
|
|
this.sliderActive1 = n |
|
|
|
|