|
|
@@ -69,7 +69,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="from-but">
|
|
|
- <button>{{$t('index.index.affirm')}}</button>
|
|
|
+ <button @click="setInvest">{{$t('index.index.affirm')}}</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -154,17 +154,17 @@ export default {
|
|
|
},
|
|
|
async setInvest() {
|
|
|
if (this.investData.sendNum > 0) {
|
|
|
- tools.error('有正在执行的交易')
|
|
|
+ tools.error(this.$t('index.index.invest.execute'))
|
|
|
return;
|
|
|
}
|
|
|
let trxNum = await bitkeepTron.getBalance('');
|
|
|
if (trxNum < 5) {
|
|
|
- tools.error('不低于TRX5')
|
|
|
+ tools.error(this.$t('index.index.invest.mix'))
|
|
|
return
|
|
|
}
|
|
|
let usdtNum = await bitkeepTron.getTokenBalance('', 0);
|
|
|
if (usdtNum < this.investData.invest_money && !tools.isDevelopment()) {
|
|
|
- tools.error('USDT数量不足')
|
|
|
+ tools.error(this.$t('index.index.invest.no_usdt'))
|
|
|
return
|
|
|
}
|
|
|
if (this.isAjax) {
|
|
|
@@ -172,8 +172,6 @@ export default {
|
|
|
}
|
|
|
this.isAjax = true
|
|
|
let transactionData = bitkeepTron.getContractData(this.investData.sysAddress, this.investData.invest_money,0)
|
|
|
- console.log('transactionData:')
|
|
|
- console.log(transactionData)
|
|
|
bitkeepTron.sendTransaction(transactionData).then((res) => {
|
|
|
if (res) {
|
|
|
setInvest({'txid':res,'id':this.investData.id}).then((res)=>{
|
|
|
@@ -189,11 +187,11 @@ export default {
|
|
|
})
|
|
|
} else {
|
|
|
this.isAjax = false
|
|
|
- tools.error('交易失败')
|
|
|
+ tools.error(this.$t('index.index.invest.send_no'))
|
|
|
}
|
|
|
}).catch((e) => {
|
|
|
this.isAjax = false
|
|
|
- tools.error('交易失败')
|
|
|
+ tools.error(this.$t('index.index.invest.send_no'))
|
|
|
})
|
|
|
},
|
|
|
setShowLang(){
|