feat(security): 添加 Token 验证功能

- 在 CommonApi.js 中添加 validateToken 函数,用于验证 Token 有效性
- 在 HomePage.vue 中集成 Token 验证功能,导出前验证登录状态- 在 UserController.java 中添加 validateToken 接口,用于后端验证 Token
This commit is contained in:
ikmkj
2025-07-31 19:39:59 +08:00
parent 16998c5144
commit cd43768baf
3 changed files with 21 additions and 3 deletions

View File

@@ -127,3 +127,6 @@ export const permanentlyDeleteItem = (id) => axiosApi.delete(`/api/trash/permane
// 清空回收站
export const cleanTrash = () => axiosApi.delete('/api/trash/clean');
// 验证Token
export const validateToken = () => axiosApi.post('/api/user/validate-token');