From 45c2066c72d99630864350774d1b099e54315ae8 Mon Sep 17 00:00:00 2001 From: vee <897831508@qq.com> Date: Tue, 16 Nov 2021 12:18:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/menu/wallet/index.vue | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/pages/menu/wallet/index.vue b/pages/menu/wallet/index.vue index 8eb061a..79f544e 100644 --- a/pages/menu/wallet/index.vue +++ b/pages/menu/wallet/index.vue @@ -97,14 +97,17 @@ showMoney1: true, showMoney2: false, btcBalance: 0, + isStop:false } }, - + onUnload: function() { + this.isStop = true + }, onLoad() { // 拿钱包 - this.userObj = uni.getStorageSync('wallet'); - // this.userObj2 = uni.getStorageSync('wallet'); - this.updateData(); + this.userObj = uni.getStorageSync('wallet'); + // this.userObj2 = uni.getStorageSync('wallet'); + this.updateData(); }, // onPullDownRefresh() { @@ -122,11 +125,14 @@ thar.userObj = uni.getStorageSync('wallet'); thar.userObj2 = uni.getStorageSync('wallet'); // thar.userObj.address = thar.userObj.ellipsisAddress; - thar.userObj.address =thar.userObj.address.substring(0, 6) + '...' + thar.userObj.address.substring(25, - thar.userObj.address.length); - thar.$walletUtil.updateBalance(); - thar.updateData(); - }, 0); + thar.userObj.address = thar.userObj.address.substring(0, 6) + '...' + thar.userObj.address + .substring(25, + thar.userObj.address.length); + thar.$walletUtil.updateBalance(); + if (!thar.isStop) { + thar.updateData() + } + }, 2000); }, goOther() { @@ -145,7 +151,7 @@ this.showMoney2 = false }, setStorage() { - + }, goTrans(itemm, index) { if (index == 0) {