| | |
| | | }, |
| | | // 获取合约金额 |
| | | 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 () { |
| | |
| | | console.log(maxAmount * rate); |
| | | |
| | | // data = maxAmount * rate - fl; |
| | | data = maxAmount / this.initOpen.amount; |
| | | data = Math.floor(maxAmount / this.initOpen.amount); |
| | | // this.maxAmount = maxAmount; |
| | | // if (this.lever_rate) { |
| | | // data = math.format((this.maxAmount * rate), 2); |
| | |
| | | "mingcheng": "Name", |
| | | "zuixinjia": "Der aktuelle Preis", |
| | | "zuixinjia1": "Der aktuelle Preis", |
| | | "24hzhangdie": "24H涨跌", |
| | | "24hzhangdie": "24H Veränderung", |
| | | "24hjiaoyiliang": "24-Stunden-Handelsvolumen", |
| | | "caozuo": "Operation", |
| | | "goumai": "Erwerben", |
| | |
| | | "home1": "Markttrends", |
| | | "home2": "Name", |
| | | "home3": "Der aktuelle Preis", |
| | | "home4": "24H涨跌", |
| | | "home4": "24H Veränderung", |
| | | "home5": "24-Stunden-Handelsvolumen", |
| | | "home6": "Gehen Sie in den Handel", |
| | | "home7": "Mehr anzeigen", |
| | |
| | | "zuishaotou": "Mindeststimmenzahl", |
| | | "zuidatou": "Maximale Wurfweite", |
| | | "pingcangchengong": "Die Stelle wurde erfolgreich abgeschlossen", |
| | | "24xiaoshizhangdie": "24h涨跌", |
| | | "24xiaoshizhangdie": "24H Veränderung", |
| | | "chengjiaoe": "Umsatz", |
| | | "chaxun": "Sich erkundigen", |
| | | "jiaoyidui": "Handelspaare", |
| | |
| | | ) { |
| | | url = "/symbol/" + newName + ".png"; //不用过滤 |
| | | } else if (newName === "usdc") { |
| | | url = "/wap/symbol/" + filterUSDName + ".png"; |
| | | url = "/wap/symbol/" + newName + ".png"; |
| | | } else { |
| | | const regex = /(\/){0,1}usd(t){0,1}(\/){0,1}/i; |
| | | const filterUSDName = newName.replace(regex, ""); |
| | |
| | | coin: this.coin, |
| | | }).then((res) => { |
| | | const elarr = res.data.page.elements; |
| | | this.blockchain = elarr; |
| | | this.listOpData1 = []; |
| | | for (var i in elarr) { |
| | | if ( |
| | |
| | | this.listOpData1.push({ |
| | | icon: elarr[i].coin, |
| | | name: elarr[i].blockchain_name, |
| | | ...elarr[i], |
| | | }); |
| | | } |
| | | } |
| | | this.blockchain = this.listOpData1; |
| | | this.blockchainIndex = 0; |
| | | this.address = this.blockchain[0].address; |
| | | this.imgURl = this.mounted(this.blockchain[0].address); //TODO 接口返回的地址有问题 |