Skip to content

Commit e997c77

Browse files
author
unknown
committed
fix bug
1 parent 9f7ec53 commit e997c77

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/index.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ import setTheme from "@/util/setTheme"
99
import Cookie from 'js-cookie'
1010
1111
export default {
12-
created(){
12+
beforeMount(){
1313
// 首次加载/刷新时从Cookie中获取Token
14-
// TODO BUG FIX: 因引入了token自动刷新机制,所以不能再判断token,而需要判断isLogin
15-
if (Cookie.get('token')) {
14+
if (Cookie.get('isLogin')) {
1615
this.$store.dispatch('auth/relogin')
1716
}
1817
// 加载默认语言包

0 commit comments

Comments
 (0)