修改数据不更新

This commit is contained in:
yuyongdong 2024-04-15 02:07:59 +08:00
parent 97a1115fe6
commit 38661125bc
3 changed files with 4 additions and 11 deletions

View File

@ -452,10 +452,11 @@ export default {
if (!this.$store.state.wallet.connected || !address) { if (!this.$store.state.wallet.connected || !address) {
throw new Error('wallet not connected') throw new Error('wallet not connected')
} }
this.isLoading = true
let storeageKey let storeageKey
try { try {
storeageKey = await sendToChain('chest_open', address, id) storeageKey = await sendToChain('chest_open', address, id)
this.isLoading = true
} catch (err) { } catch (err) {
this.$showErr(err.data.message) this.$showErr(err.data.message)
this.isLoading = false this.isLoading = false

View File

@ -239,7 +239,7 @@ export default {
this.isLoading = false; this.isLoading = false;
if(this.isNewUser == 0) { if(this.isNewUser == 0) {
// 8 // 8
this.awardData = {data, isNewUser: this.isNewUser} this.awardData = {...data, isNewUser: this.isNewUser}
this.$emit('awardDialog', this.awardData) this.$emit('awardDialog', this.awardData)
this.$emit('handleClose') this.$emit('handleClose')
} else { } else {
@ -248,7 +248,6 @@ export default {
this.$emit('awardDialog', this.awardData) this.$emit('awardDialog', this.awardData)
this.$emit('handleClose') this.$emit('handleClose')
} }
this.getUserState()
localStorage.removeItem(storeageKey) localStorage.removeItem(storeageKey)
clearInterval(serTimeId) clearInterval(serTimeId)
} else if (errcode !== 14) { } 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() { helpDialog() {

View File

@ -1027,6 +1027,7 @@ export default {
this.awardData = val this.awardData = val
this.eventName = 'help_event' this.eventName = 'help_event'
this.dialogTitle = 'Got lucky and success full Boosting' this.dialogTitle = 'Got lucky and success full Boosting'
this.getUserState()
this.getGameStat(); this.getGameStat();
this.ExploreDialogVisible = true this.ExploreDialogVisible = true
}, },