diff --git a/src/views/home/boxBtm.vue b/src/views/home/boxBtm.vue index 8fe7a6c..3893bba 100644 --- a/src/views/home/boxBtm.vue +++ b/src/views/home/boxBtm.vue @@ -452,10 +452,11 @@ export default { if (!this.$store.state.wallet.connected || !address) { throw new Error('wallet not connected') } - this.isLoading = true let storeageKey try { storeageKey = await sendToChain('chest_open', address, id) + this.isLoading = true + } catch (err) { this.$showErr(err.data.message) this.isLoading = false diff --git a/src/views/home/helpDialog.vue b/src/views/home/helpDialog.vue index 5aeca4a..081c886 100644 --- a/src/views/home/helpDialog.vue +++ b/src/views/home/helpDialog.vue @@ -239,7 +239,7 @@ export default { this.isLoading = false; if(this.isNewUser == 0) { // 8、关闭助力弹窗 - this.awardData = {data, isNewUser: this.isNewUser} + this.awardData = {...data, isNewUser: this.isNewUser} this.$emit('awardDialog', this.awardData) this.$emit('handleClose') } else { @@ -248,7 +248,6 @@ export default { this.$emit('awardDialog', this.awardData) this.$emit('handleClose') } - this.getUserState() localStorage.removeItem(storeageKey) clearInterval(serTimeId) } else if (errcode !== 14) { @@ -274,14 +273,6 @@ export default { } } }, - // 获取用户状态 - getUserState() { - this.$axios.get(process.env.VUE_APP_API_URL+'/api/user/state',{ params: '', - headers: { Authorization: `Bearer ${this.token}` }, - }).then(res => { - localStorage.setItem('userData', JSON.stringify(res.data.data)) - }) - }, // 关闭弹窗 helpDialog() { diff --git a/src/views/home/index.vue b/src/views/home/index.vue index c1f66e0..e484f28 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -1027,6 +1027,7 @@ export default { this.awardData = val this.eventName = 'help_event' this.dialogTitle = 'Got lucky and success full Boosting' + this.getUserState() this.getGameStat(); this.ExploreDialogVisible = true },