|
@@ -4,7 +4,7 @@
|
|
<div class="left">
|
|
<div class="left">
|
|
<div class="item">
|
|
<div class="item">
|
|
<div class="number">
|
|
<div class="number">
|
|
- {{ countFee.expendGas }}
|
|
|
|
|
|
+ {{ getRoundedNumber(countFee.expendGas) }} ETH
|
|
</div>
|
|
</div>
|
|
<div class="title">
|
|
<div class="title">
|
|
支出/气体
|
|
支出/气体
|
|
@@ -13,7 +13,7 @@
|
|
<div class="verticalLine"/>
|
|
<div class="verticalLine"/>
|
|
<div class="item">
|
|
<div class="item">
|
|
<div class="number">
|
|
<div class="number">
|
|
- {{countFee.principalBalance}}
|
|
|
|
|
|
+ {{ getRoundedNumber(countFee.principalBalance) }} ETH
|
|
</div>
|
|
</div>
|
|
<div class="title">
|
|
<div class="title">
|
|
剩余本金
|
|
剩余本金
|
|
@@ -22,7 +22,7 @@
|
|
<div class="verticalLine"/>
|
|
<div class="verticalLine"/>
|
|
<div class="item">
|
|
<div class="item">
|
|
<div class="number">
|
|
<div class="number">
|
|
- {{countFee.predictTotalCost}}
|
|
|
|
|
|
+ {{ getRoundedNumber(countFee.predictTotalCost * ethToUsdt) }} USDT
|
|
</div>
|
|
</div>
|
|
<div class="title">
|
|
<div class="title">
|
|
预计支出总费用
|
|
预计支出总费用
|
|
@@ -90,14 +90,15 @@
|
|
预期投入
|
|
预期投入
|
|
</div>
|
|
</div>
|
|
<div class="amount">
|
|
<div class="amount">
|
|
- 888232
|
|
|
|
|
|
+ {{ getRoundedNumber(countFee.predictTotalCost * ethToUsdt) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="info">
|
|
<div class="info">
|
|
共{{echartsInputData.totalCount}}项
|
|
共{{echartsInputData.totalCount}}项
|
|
</div>
|
|
</div>
|
|
<div class="info">
|
|
<div class="info">
|
|
- 总支出:{{echartsInputData.totalCost}}
|
|
|
|
|
|
+<!-- 总支出:{{echartsInputData.totalCost}}-->
|
|
|
|
+ {{ getRoundedNumber(countFee.expendGas * ethToUsdt) }}
|
|
</div>
|
|
</div>
|
|
<div class="progress">
|
|
<div class="progress">
|
|
<div class="progress">
|
|
<div class="progress">
|
|
@@ -369,10 +370,12 @@ export default {
|
|
},
|
|
},
|
|
timer:null,
|
|
timer:null,
|
|
gas:{},
|
|
gas:{},
|
|
- loading:false
|
|
|
|
|
|
+ loading:false,
|
|
|
|
+ ethToUsdt:0,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
|
|
+ this.getEthToUsdt()
|
|
this.getExpectedInput()
|
|
this.getExpectedInput()
|
|
this.getCountFee()
|
|
this.getCountFee()
|
|
this.getDailyCost()
|
|
this.getDailyCost()
|
|
@@ -647,8 +650,19 @@ export default {
|
|
this.loading = false
|
|
this.loading = false
|
|
})
|
|
})
|
|
})
|
|
})
|
|
-
|
|
|
|
},
|
|
},
|
|
|
|
+ getEthToUsdt(){
|
|
|
|
+ fetch('https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd')
|
|
|
|
+ .then( response =>{
|
|
|
|
+ let res = response.json()
|
|
|
|
+ res.then(result =>{
|
|
|
|
+ this.ethToUsdt = result.ethereum.usd
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getRoundedNumber(number){
|
|
|
|
+ return parseFloat(number.toFixed(4))
|
|
|
|
+ }
|
|
|
|
|
|
},
|
|
},
|
|
};
|
|
};
|