feat: 提交任务、按F5刷新时会读取最新的余额
This commit is contained in:
parent
4d428b9d94
commit
dda43f2de6
|
|
@ -100,6 +100,7 @@ import { constantRoutes } from '@/router/index.js'
|
||||||
import Login from './Login.vue'
|
import Login from './Login.vue'
|
||||||
import { LOCALE_NAMES } from '@/lang/i18n'
|
import { LOCALE_NAMES } from '@/lang/i18n'
|
||||||
import User from './User.vue'
|
import User from './User.vue'
|
||||||
|
import { getToken } from '@/utils/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'nav-bar',
|
name: 'nav-bar',
|
||||||
|
|
@ -182,6 +183,9 @@ export default {
|
||||||
this.openLogin()
|
this.openLogin()
|
||||||
}
|
}
|
||||||
this.getLogo()
|
this.getLogo()
|
||||||
|
if (getToken()) {
|
||||||
|
this.$store.dispatch('user/getInfo').catch(() => {})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openLogin() {
|
openLogin() {
|
||||||
|
|
|
||||||
|
|
@ -1150,6 +1150,7 @@ export default {
|
||||||
this.videoId = res.data.id
|
this.videoId = res.data.id
|
||||||
this.showResult = true
|
this.showResult = true
|
||||||
this.$refs.videoComposeRef?.clearPromptOnly?.()
|
this.$refs.videoComposeRef?.clearPromptOnly?.()
|
||||||
|
this.$store.dispatch('user/getInfo').catch(() => {})
|
||||||
this.getVideo(res.data.id)
|
this.getVideo(res.data.id)
|
||||||
this.refreshChatFirstPage()
|
this.refreshChatFirstPage()
|
||||||
} else if (res.code == -1) {
|
} else if (res.code == -1) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue