代码优化

This commit is contained in:
hooray
2021-10-22 10:12:27 +08:00
parent c2eabf7950
commit 1b00c3d7c0
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ export default [
data: {
account: option.body.account,
token: '@string',
failure_time: Date.parse(new Date()) / 1000 + 24 * 60 * 60
failure_time: Math.ceil(new Date().getTime() / 1000) + 24 * 60 * 60
}
}
}
+1 -2
View File
@@ -11,8 +11,7 @@ const getters = {
isLogin: state => {
let retn = false
if (state.token) {
let unix = Date.parse(new Date())
if (unix < state.failure_time * 1000) {
if (new Date().getTime() < state.failure_time * 1000) {
retn = true
}
}