1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2026-04-26 04:04:08 +08:00

fix: 修改时间方法Date.now()

This commit is contained in:
v_zhangzp
2023-08-31 17:03:07 +08:00
parent 3ed1aafa80
commit ba20e7a96b
2 changed files with 3 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ export async function refreshAccessToken() {
}
const { time } = tokenItem
// token生成或者刷新后30分钟内不执行刷新
if (new Date().getTime() - time <= 1000 * 60 * 30) return
if (Date.now() - time <= 1000 * 60 * 30) return
try {
const res = await api.refreshToken()
setToken(res.data.token)