diff --git a/src/router/index.js b/src/router/index.js
index e501125..780df24 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -24,7 +24,11 @@ export const pageRoutes = [
{ path: '/login',
component: () => import('@/views/pages/login'),
name: 'login',
- meta: { title: '登录' } }
+ meta: { title: '登录' } },
+ { path: '/autoLogin',
+ component: () => import('@/views/pages/autoLogin'),
+ name: 'autoLogin',
+ meta: { title: '自动登录' } }
]
// 模块路由(基于主入口布局页面)
@@ -46,6 +50,12 @@ const router = new Router({
})
router.beforeEach((to, from, next) => {
+ if (to.name === 'autoLogin') {
+ let sec = (parseInt(to.query._t) - new Date().getTime())
+ if (to.query._t === undefined || sec > 1500 || sec < -1500) {
+ return next({ name: 'login' })
+ }
+ }
// 添加动态(菜单)路由
// 已添加或者当前路由为页面路由, 可直接访问
if (window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] || fnCurrentRouteIsPageRoute(to, pageRoutes)) {
diff --git a/src/views/pages/autoLogin.vue b/src/views/pages/autoLogin.vue
new file mode 100644
index 0000000..3c192b1
--- /dev/null
+++ b/src/views/pages/autoLogin.vue
@@ -0,0 +1,67 @@
+
+
+
+
+