| | |
| | | }, |
| | | // 获取合约金额 |
| | | getContractAmount: function () { |
| | | console.log("获取合约金额", this.initOpen.amount, this.inputAmount); |
| | | const amount = this.inputAmount; |
| | | let data = "0.00"; |
| | | if (amount != undefined && this.lever_rate != undefined) { |
| | | if (this.lever_rate?.length > 0) { |
| | | data = amount * this.initOpen.amount; |
| | | } else if (this.lever_rate.length == 0) { |
| | | data = this.sessionObj?.amount * amount * 1; |
| | | } |
| | | } |
| | | return bigDecimal.round(data, 2); |
| | | // if (amount != undefined && this.lever_rate != undefined) { |
| | | // if (this.lever_rate?.length > 0) { |
| | | data = amount * this.initOpen.amount; |
| | | // } |
| | | // else if (this.lever_rate.length == 0) { |
| | | // data = this.sessionObj?.amount * amount * 1; |
| | | // } |
| | | // } |
| | | return data; |
| | | }, |
| | | // 获取保证金,开仓才需要 |
| | | getMargin: function () { |