feat(security): 添加 Token 验证功能
- 在 CommonApi.js 中添加 validateToken 函数,用于验证 Token 有效性 - 在 HomePage.vue 中集成 Token 验证功能,导出前验证登录状态- 在 UserController.java 中添加 validateToken 接口,用于后端验证 Token
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user