公告板
版本库
filestore
活动
搜索
登录
main
/
12333GovernmentWeb
四流合一政务端
概况
操作记录
提交次数
目录
文档
派生
对比
blame
|
历史
|
原始文档
feat: 接口
wupengfei
2025-04-11
29f11797c036e8b7f66ba0337b1aaa005eb508e2
[12333GovernmentWeb.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;
}