|
@ -10,14 +10,20 @@ |
|
|
</text> |
|
|
</text> |
|
|
</navigation> |
|
|
</navigation> |
|
|
<view class="main"> |
|
|
<view class="main"> |
|
|
<view :class="{'money_con': userObj.coinList[0].xname=='Ethereum', 'money_con2': userObj.coinList[0].xname=='Bitcoin', 'money_con3': userObj.coinList[0].xname=='TRON'}"> |
|
|
<view |
|
|
<image src="../../../static/tongyonh/ethereum.png" mode="aspectFit" class="imgicon" v-if="userObj.coinList[0].xname=='Ethereum'"></image> |
|
|
:class="{'money_con': userObj.coinList[0].xname=='Ethereum', 'money_con2': userObj.coinList[0].xname=='Bitcoin', 'money_con3': userObj.coinList[0].xname=='TRON'}"> |
|
|
<image src="../../../static/tongyonh/Frame28.png" mode="aspectFit" class="imgicon" v-if="userObj.coinList[0].xname=='Bitcoin'"></image> |
|
|
<image src="../../../static/tongyonh/ethereum.png" mode="aspectFit" class="imgicon" |
|
|
<image src="../../../static/tongyonh/tronicon.png" mode="aspectFit" class="imgicon" v-if="userObj.coinList[0].xname=='TRON'"></image> |
|
|
v-if="userObj.coinList[0].xname=='Ethereum'"></image> |
|
|
|
|
|
<image src="../../../static/tongyonh/Frame28.png" mode="aspectFit" class="imgicon" |
|
|
|
|
|
v-if="userObj.coinList[0].xname=='Bitcoin'"></image> |
|
|
|
|
|
<image src="../../../static/tongyonh/tronicon.png" mode="aspectFit" class="imgicon" |
|
|
|
|
|
v-if="userObj.coinList[0].xname=='TRON'"></image> |
|
|
<view class="textcon1 flex"> |
|
|
<view class="textcon1 flex"> |
|
|
<text class="text">{{this.userObj.name}}</text> |
|
|
<text class="text">{{this.userObj.name}}</text> |
|
|
<image src="../../../static/tongyonh/visibility_24px.png" mode="aspectFit" class="img1" @click="showMoney()" v-if="showMoney1"></image> |
|
|
<image src="../../../static/tongyonh/visibility_24px.png" mode="aspectFit" class="img1" |
|
|
<image src="../../../static/tongyonh/eyeno.png" mode="aspectFit" class="img1" @click="showMoney22()" v-if="showMoney2"></image> |
|
|
@click="showMoney()" v-if="showMoney1"></image> |
|
|
|
|
|
<image src="../../../static/tongyonh/eyeno.png" mode="aspectFit" class="img1" @click="showMoney22()" |
|
|
|
|
|
v-if="showMoney2"></image> |
|
|
</view> |
|
|
</view> |
|
|
<view class="textcon2" v-if="showMoney1"> |
|
|
<view class="textcon2" v-if="showMoney1"> |
|
|
$ {{!userObj.balancePrice?0.00:userObj.balancePrice}} |
|
|
$ {{!userObj.balancePrice?0.00:userObj.balancePrice}} |
|
@ -35,7 +41,9 @@ |
|
|
<view class="title"> |
|
|
<view class="title"> |
|
|
Assets |
|
|
Assets |
|
|
</view> |
|
|
</view> |
|
|
<image src="../../../static/tongyonh/IconGroup.png" mode="aspectFit" class="jiaimg" v-if="userObj.coinList[0].xname!='Bitcoin'&&userObj.coinList[0].xname!='TRON'" @click="goOther"></image> |
|
|
<image src="../../../static/tongyonh/IconGroup.png" mode="aspectFit" class="jiaimg" |
|
|
|
|
|
v-if="userObj.coinList[0].xname!='Bitcoin'&&userObj.coinList[0].xname!='TRON'" @click="goOther"> |
|
|
|
|
|
</image> |
|
|
</view> |
|
|
</view> |
|
|
<view class="scroll"> |
|
|
<view class="scroll"> |
|
|
<view class="item flexx" @click="goTrans(item,index)" v-for="item,index in this.userObj.coinList"> |
|
|
<view class="item flexx" @click="goTrans(item,index)" v-for="item,index in this.userObj.coinList"> |
|
@ -94,18 +102,27 @@ |
|
|
|
|
|
|
|
|
onLoad() { |
|
|
onLoad() { |
|
|
this.setStorage(); |
|
|
this.setStorage(); |
|
|
|
|
|
this.$walletUtil.updateBalance(); |
|
|
if (uni.getStorageSync('wallet')) { |
|
|
if (uni.getStorageSync('wallet')) { |
|
|
this.userObj = uni.getStorageSync('wallet'); |
|
|
this.userObj = uni.getStorageSync('wallet'); |
|
|
this.userObj2 = uni.getStorageSync('wallet'); |
|
|
this.userObj2 = uni.getStorageSync('wallet'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.updateData(); |
|
|
this.updateData(); |
|
|
this.userObj.address = this.userObj.address.substring(0, 6)+'...'+this.userObj.address.substring(25,this.userObj.address.length); |
|
|
this.userObj.address = this.userObj.address.substring(0, 6) + '...' + this.userObj.address.substring(25, |
|
|
|
|
|
this.userObj.address.length); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onPullDownRefresh() { |
|
|
|
|
|
console.log('refresh'); |
|
|
|
|
|
this.$walletUtil.updateBalance(); |
|
|
|
|
|
setTimeout(function() { |
|
|
|
|
|
uni.stopPullDownRefresh(); |
|
|
|
|
|
}, 500); |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
updateData() { |
|
|
updateData() { |
|
|
let thar = this; |
|
|
let thar = this; |
|
@ -137,7 +154,8 @@ |
|
|
setStorage() { |
|
|
setStorage() { |
|
|
this.walletInfo = uni.getStorageSync('walletInfo'); |
|
|
this.walletInfo = uni.getStorageSync('walletInfo'); |
|
|
this.userObj = this.walletInfo.BTC[0] |
|
|
this.userObj = this.walletInfo.BTC[0] |
|
|
this.userObj.address = this.userObj.address.substring(0, 6)+'...'+this.userObj.address.substring(25,this.userObj.address.length); |
|
|
this.userObj.address = this.userObj.address.substring(0, 6) + '...' + this.userObj.address.substring(25, |
|
|
|
|
|
this.userObj.address.length); |
|
|
console.log(this.walletInfo.BTC[0]) |
|
|
console.log(this.walletInfo.BTC[0]) |
|
|
}, |
|
|
}, |
|
|
goTrans(itemm, index) { |
|
|
goTrans(itemm, index) { |
|
|