公告板
版本库
filestore
活动
搜索
登录
main
/
JYBIndependentFront
江佑保前端
概况
操作记录
提交次数
目录
文档
派生
对比
blame
|
历史
|
原始文档
fix: 江佑保系统健壮性修复
zhengyiming
18 小时以前
62287d09f9f5f1135163359fa18fd1fc4f8b2bc6
[JYBIndependentFront.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;
}