仪表盘
版本库
文件存储
活动
搜索
登录
main
/
flexJobAdminBClient
灵活用工甲方web端
概况
操作记录
提交次数
目录
文档
复刻
对比
blame
|
历史
|
原始文档
fix: bug
wupengfei
2025-11-08
7738caf497efdfb61f5e262d2a854fc23f86bf88
[flexJobAdminBClient.git]
/
src
/
utils
/
common
/
user.ts
1
2
3
4
5
6
export function tokenIsExpired(userInfo: API.IdentityModelTokenCacheItem) {
const now = new Date().getTime();
const expiresIn = userInfo.expiresIn;
const expired = (now - new Date(userInfo.creationTime).getTime()) / 1000 >= expiresIn - 300;
return expired;
}