保险前后端,养殖端和保险端小程序

This commit is contained in:
xuqiuyun
2025-09-17 19:01:52 +08:00
parent e4287b83fe
commit 473891163c
218 changed files with 109331 additions and 14103 deletions

View File

@@ -1111,6 +1111,11 @@ router.get('/roles', async (req, res) => {
router.get('/validate', verifyToken, async (req, res) => {
try {
// 设置禁用缓存的响应头
res.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate');
res.setHeader('Pragma', 'no-cache');
res.setHeader('Expires', '0');
// 如果能到达这里说明token是有效的
const user = await User.findByPk(req.user.id, {
attributes: ['id', 'username', 'email', 'status'],