From 1b00c3d7c0f8f70d045507dae50417d697199a80 Mon Sep 17 00:00:00 2001 From: hooray <304327508@qq.com> Date: Fri, 22 Oct 2021 10:12:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mock/member.js | 2 +- src/store/modules/user.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mock/member.js b/src/mock/member.js index b515e2ae..c7fedc67 100644 --- a/src/mock/member.js +++ b/src/mock/member.js @@ -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 } } } diff --git a/src/store/modules/user.js b/src/store/modules/user.js index f1331eac..076953e4 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -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 } }