修改数据不更新

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) {
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

View File

@ -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() {

View File

@ -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
},