From 132a6f6d308152b5c97567510d472054dd501649 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Thu, 12 Jun 2025 10:00:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E4=BF=AE=E6=94=B92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 22 ++++++++++++++++++---- src/views/login1.vue | 4 ++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index a5cd822c..802a658f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -64,13 +64,27 @@ export const constantRoutes = [ { path: '', component: Layout, - redirect: '/index', + redirect: '/canteen/index', + // children: [ + // { + // path: 'index', + // component: () => import('@/views/index'), + // name: 'Index', + // meta: { title: '首页', icon: 'dashboard', affix: true } + // } + // ] + }, + { + path: '/canteen', + component: Layout, + hidden: true, + redirect: 'noredirect', children: [ { path: 'index', - component: () => import('@/views/index'), - name: 'Index', - meta: { title: '首页', icon: 'dashboard', affix: true } + component: () => import('@/views/index_v1'), + name: 'Profile', + meta: { title: '食堂数据总览', icon: 'dashboard' } } ] }, diff --git a/src/views/login1.vue b/src/views/login1.vue index 542abc29..4b5fd668 100644 --- a/src/views/login1.vue +++ b/src/views/login1.vue @@ -263,14 +263,14 @@ export default { if (res.code===200){ if (res.isLogin){ this.$modal.confirm('账号已在其他地方登录是否继续登录!!!!').then(function() { - return this.$router.push({ path: this.redirect || '/' }); + return this.$router.push({ path: this.redirect || '/canteen/index' }); }).then(() => { this.loading = false }).catch(() => { this.loading = false }) }else { - this.$router.push({ path: this.redirect || '/' }); + this.$router.push({ path: this.redirect || '/canteen/index' }); } } })