|
@ -46,7 +46,7 @@ |
|
|
</image> |
|
|
</image> |
|
|
</view> |
|
|
</view> |
|
|
<!-- <view class="scroll"> --> |
|
|
<!-- <view class="scroll"> --> |
|
|
<scroll-view :scroll-y="true" style="max-height: 880rpx;" lower-threshold="50"> |
|
|
<scroll-view :scroll-y="true" style="max-height: 880rpx;" lower-threshold="50"> |
|
|
<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"> |
|
|
<view class="left flex "> |
|
|
<view class="left flex "> |
|
|
<view class="img1"> |
|
|
<view class="img1"> |
|
@ -76,8 +76,8 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<!-- </view> --> |
|
|
<!-- </view> --> |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
@ -104,27 +104,45 @@ |
|
|
showMoney1: true, |
|
|
showMoney1: true, |
|
|
showMoney2: false, |
|
|
showMoney2: false, |
|
|
btcBalance: 0, |
|
|
btcBalance: 0, |
|
|
isStop: false |
|
|
isStop: false, |
|
|
|
|
|
timer: null |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onUnload: function() { |
|
|
onUnload: function() { |
|
|
this.isStop = true |
|
|
console.log("停止了") |
|
|
uni.setStorageSync('isWallet', false); |
|
|
uni.setStorageSync('isWallet', false); |
|
|
|
|
|
if (this.timer) { |
|
|
|
|
|
console.log("停止了") |
|
|
|
|
|
clearInterval(this.timer); |
|
|
|
|
|
this.timer = null; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
onShow() { |
|
|
|
|
|
this.timer = setInterval(() => { |
|
|
|
|
|
this.updateBalance(); |
|
|
|
|
|
}, 5000) |
|
|
|
|
|
}, |
|
|
|
|
|
onHide() { |
|
|
|
|
|
if (this.timer) { |
|
|
|
|
|
console.log("停止了") |
|
|
|
|
|
clearInterval(this.timer); |
|
|
|
|
|
this.timer = null; |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onLoad() { |
|
|
onLoad() { |
|
|
|
|
|
|
|
|
let currency = uni.getStorageSync('currency'); |
|
|
let currency = uni.getStorageSync('currency'); |
|
|
if (currency) { |
|
|
if (currency) { |
|
|
this.currency = currency; |
|
|
this.currency = currency; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 拿钱包 |
|
|
// 拿钱包 |
|
|
//console.log(this.$TronUtil.decode("TBk72yKTJWppCsa7XrsU7Qhfo4yNvbm8rE")) |
|
|
//console.log(this.$TronUtil.decode("TBk72yKTJWppCsa7XrsU7Qhfo4yNvbm8rE")) |
|
|
this.userObj = uni.getStorageSync('wallet'); |
|
|
this.userObj = uni.getStorageSync('wallet'); |
|
|
console.log('eth有走这吗') |
|
|
console.log('eth有走这吗') |
|
|
this.updateBalance(); |
|
|
this.updateBalance(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
@ -134,17 +152,17 @@ |
|
|
}, |
|
|
}, |
|
|
onPullDownRefresh() { |
|
|
onPullDownRefresh() { |
|
|
this.updateBalance(); |
|
|
this.updateBalance(); |
|
|
|
|
|
|
|
|
setTimeout(function() { |
|
|
setTimeout(function() { |
|
|
uni.stopPullDownRefresh(); |
|
|
uni.stopPullDownRefresh(); |
|
|
}, 500); |
|
|
}, 500); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
async updateBalance(){ |
|
|
async updateBalance() { |
|
|
|
|
|
|
|
|
this.userObj = await this.$walletUtil.updateBalance(); |
|
|
this.userObj = await this.$walletUtil.updateBalance(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
goOther() { |
|
|
goOther() { |
|
|
|
|
|
|
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
@ -179,12 +197,12 @@ |
|
|
var _this = this |
|
|
var _this = this |
|
|
uni.scanCode({ |
|
|
uni.scanCode({ |
|
|
success: function(res) { |
|
|
success: function(res) { |
|
|
uni.setStorageSync('address',res.result) |
|
|
uni.setStorageSync('address', res.result) |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '/pages/menu/sendToken/transfer/index?item=index' |
|
|
url: '/pages/menu/sendToken/transfer/index?item=index' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
goCwallet() { |
|
|
goCwallet() { |
|
|