From 6203566058ea22acc578ac45e4b8d1e9fa59890f Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Mon, 10 Oct 2022 14:53:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/router/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/router/index.js b/front/src/router/index.js index 9c0f4ca9..536d6b37 100644 --- a/front/src/router/index.js +++ b/front/src/router/index.js @@ -575,13 +575,13 @@ router.beforeEach((to, from, next) => { // 定义失效时间 const timeOver = 2 * 60 * 60 * 1000 let date = new Date().getTime() - if (date - tokenStartTime > timeOver) { + if (date - tokenStartTime > timeOver && token) { + message.warning('登录失效,请重新登录!') token = null } console.log('判断token失效', token, date - tokenStartTime > timeOver) if (!token) { if (to.path == '/login') return next() - message.warning('登录失效,请重新登录!') return next('/login') } else if (to.path == '/login') { return next('/home') From 9c3a8495c0481d403132577be1419d87b9ad0d1e Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Mon, 10 Oct 2022 15:29:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E6=8C=89=E9=92=AE=20?= =?UTF-8?q?=E5=8F=AA=E8=83=BD=E7=82=B9=E4=B8=80=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/apply.vue | 1677 +++++++++++++++++--------------- 1 file changed, 894 insertions(+), 783 deletions(-) diff --git a/front/src/views/home/apply.vue b/front/src/views/home/apply.vue index f49180d0..0b7b7ebe 100644 --- a/front/src/views/home/apply.vue +++ b/front/src/views/home/apply.vue @@ -8,36 +8,93 @@