From cdc4e3c4b079b4dc6027b8e7f0ea25bb5a3a1eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Wed, 20 Oct 2021 23:21:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E5=89=8D=E7=AB=AF=E7=9A=84=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E7=BC=93=E5=AD=98=E6=94=B9=E4=B8=BA7=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jshERP-web/src/store/modules/user.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jshERP-web/src/store/modules/user.js b/jshERP-web/src/store/modules/user.js index 9475ecca..4c7f363e 100644 --- a/jshERP-web/src/store/modules/user.js +++ b/jshERP-web/src/store/modules/user.js @@ -70,7 +70,8 @@ const user = { const result = response.data Vue.ls.set(USER_ID, result.user.id, 7 * 24 * 60 * 60 * 1000); Vue.ls.set(USER_LOGIN_NAME, result.user.loginName, 7 * 24 * 60 * 60 * 1000); - Vue.ls.set(ACCESS_TOKEN, result.token, 1 * 24 * 60 * 60 * 1000) + //前端7天有效期,后端默认1天,只要用户在1天内有访问页面就可以一直续期直到7天结束 + Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000) Vue.ls.set(USER_INFO, result.user, 7 * 24 * 60 * 60 * 1000) commit('SET_TOKEN', result.token) }