优化一些功能

This commit is contained in:
lemon橪
2021-06-11 19:01:05 +08:00
parent eb2b3a66a0
commit 0837f5d9d9
6 changed files with 149 additions and 94 deletions

View File

@@ -71,7 +71,7 @@ service.interceptors.request.use(
let jwtData = JSON.parse(
decodeURIComponent(escape(window.atob(accessToken.split(".")[1])))
);
if (jwtData.exp < new Date().getTime() / 1000) {
if (jwtData.exp < Math.round(new Date() / 1000)) {
refresh()
}
}