From b15b560daa7d79ae0289948c314e728188024341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Thu, 26 Feb 2026 14:14:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/common/login.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/common/login.vue b/src/views/common/login.vue index e8ef593..aa97cad 100644 --- a/src/views/common/login.vue +++ b/src/views/common/login.vue @@ -146,7 +146,8 @@ }) }).then(({data}) => { if (data && data.code === 0) { - this.$cookie.set('token', data.token) + // 设置Cookie过期时间为8小时,与后端token同步 - rqrq + this.$cookie.set('token', data.token, { expires: '8h' }) this.$router.replace({ name: 'home' }) this.$i18n.locale=data.language localStorage.setItem('locale', data.language)