From 986a755f6e2f888f280e846d6c09e2b2cc189ecc Mon Sep 17 00:00:00 2001 From: pumelotea Date: Thu, 17 Mar 2022 20:13:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/global/router/config.js | 6 ++ src/views/login/index.vue | 2 + src/views/quick-login/index.vue | 105 ++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 src/views/quick-login/index.vue diff --git a/src/global/router/config.js b/src/global/router/config.js index 5ccab33..0ec2b1f 100644 --- a/src/global/router/config.js +++ b/src/global/router/config.js @@ -42,6 +42,11 @@ const routes = [ path: '/login', component: () => import('/src/views/login/index.vue') }, + { + name: 'quick-login', + path: '/quick-login', + component: () => import('/src/views/quick-login/index.vue') + }, { name: 'signup', path: '/signup', @@ -56,6 +61,7 @@ const routes = [ const whiteList = [ '/login', + '/quick-login', '/recover', '/signup' ] diff --git a/src/views/login/index.vue b/src/views/login/index.vue index def74aa..402b2dc 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -27,6 +27,8 @@ function login(e) { loginFormRef.value?.validate((errors) => { if (!errors) { security.signIn(loginForm.password,{ + refreshToken:'jwt refresh', // 写入刷新token + refreshTokenExpiredAt: new Date().getTime() + 3600*24*7, // 刷新token过期时间 username: loginForm.username, nickname:'千阳', avatar:'https://oss.injs.jsxww.cn/net-disk-smh/09505891f7a34e82b64a5922ecf5a7e0.gif?x-oss-process=image/resize,w_100/quality,q_95', diff --git a/src/views/quick-login/index.vue b/src/views/quick-login/index.vue new file mode 100644 index 0000000..99fd814 --- /dev/null +++ b/src/views/quick-login/index.vue @@ -0,0 +1,105 @@ + + + + +