@jx3box/jx3box-common-ui 9.2.9 → 9.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Header.vue +9 -1
- package/src/single/PostVersion.vue +2 -2
package/package.json
CHANGED
package/src/Header.vue
CHANGED
|
@@ -112,8 +112,11 @@ export default {
|
|
|
112
112
|
const token_version = localStorage.getItem("token_version");
|
|
113
113
|
|
|
114
114
|
if (User.isLogin()) {
|
|
115
|
-
|
|
115
|
+
// 对于没有token_version或者token_version不是最新的用户,都需要登出
|
|
116
|
+
if (!token_version || token_version != global_token_version) {
|
|
117
|
+
// 先保存最新的token_version
|
|
116
118
|
localStorage.setItem("token_version", global_token_version);
|
|
119
|
+
// 然后执行登出操作
|
|
117
120
|
User.destroy().then((res) => {
|
|
118
121
|
this.$refs.user?.logout();
|
|
119
122
|
// 清除马甲所有马甲信息
|
|
@@ -132,6 +135,11 @@ export default {
|
|
|
132
135
|
}
|
|
133
136
|
});
|
|
134
137
|
}
|
|
138
|
+
} else {
|
|
139
|
+
// 非登录状态也更新token_version,确保用户下次登录时使用新版本
|
|
140
|
+
if (global_token_version) {
|
|
141
|
+
localStorage.setItem("token_version", global_token_version);
|
|
142
|
+
}
|
|
135
143
|
}
|
|
136
144
|
});
|
|
137
145
|
},
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
>
|
|
16
16
|
</li>
|
|
17
17
|
</ul>
|
|
18
|
-
<el-pagination small layout="prev, pager, next" :total="total" :current-page.sync="index" hide-on-single-page>
|
|
19
|
-
</el-pagination>
|
|
18
|
+
<!-- <el-pagination small layout="prev, pager, next" :total="total" :current-page.sync="index" hide-on-single-page>
|
|
19
|
+
</el-pagination> -->
|
|
20
20
|
<version-dialog
|
|
21
21
|
v-if="visible"
|
|
22
22
|
v-model="visible"
|