Skip to content

Commit e24a3e1

Browse files
committed
登出清空数据
1 parent ee35fae commit e24a3e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

front/src/stores/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const useMainStore = defineStore('main', {
1515
token: null,
1616
links: [],
1717
categories: [],
18-
lastModified: 0,
18+
lastModified: -1,
1919
config: {
2020
enableNoAuth: false,
2121
enableNoAuthView: false,
@@ -37,6 +37,8 @@ export const useMainStore = defineStore('main', {
3737
logout() {
3838
this.token = null
3939
this.links = []
40+
this.categories = []
41+
this.lastModified = -1
4042
},
4143
// 验证 token 是否有效
4244
async validateToken(): Promise<boolean> {

0 commit comments

Comments
 (0)