From a140f5b80a6400ce111649b64ab6c14ffc5dbcf9 Mon Sep 17 00:00:00 2001 From: j1ack <1209452658@qq.com> Date: Fri, 2 Jun 2023 10:56:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95bug=E2=80=99=20git=20commit?= =?UTF-8?q?=20-m=20=E8=8F=9C=E5=8D=95bug=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 28 ++++++++++++++-------------- src/views/login.vue | 6 ++++-- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 7149e48..85ad1ae 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -57,20 +57,20 @@ export const constantRoutes = [ component: (resolve) => require(['@/views/error/401'], resolve), hidden: true }, - { - path: '/', - component: Layout, - redirect: 'index', - children: [ - { - path: '/', - component: (resolve) => require(['@/views/index_v1'], resolve), - hidden: true, - name: '首页', - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } - } - ] - }, + // { + // path: '/', + // component: Layout, + // redirect: 'index', + // children: [ + // { + // path: '/', + // component: (resolve) => require(['@/views/index_v1'], resolve), + // hidden: true, + // name: '首页', + // meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + // } + // ] + // }, { path: '/user', component: Layout, diff --git a/src/views/login.vue b/src/views/login.vue index 3cdc43e..4087083 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -67,6 +67,7 @@ import { getCodeImg } from "@/api/login"; import Cookies from "js-cookie"; import { encrypt, decrypt } from '@/utils/jsencrypt' +import { getRouters } from '@/api/menu' export default { name: "Login", @@ -180,7 +181,7 @@ export default { Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 }); this.$store.dispatch("Login", this.loginForm).then(() => { - this.$router.push({ path: this.redirect || "/" }).catch(() => { }); + this.$router.push({ path: this.redirect}).catch(() => { }); }).catch(() => { // if (this.captchaEnabled) { // this.loading = false; @@ -410,4 +411,5 @@ export default { .login-code-img { height: 38px; -} +} +