Browse Source

增加数据看板,首页跳转模块

master
mk 2 years ago
parent
commit
9957f59be3
  1. 7
      src/router/index.js
  2. 6
      src/views/main-navbar.vue
  3. 2
      src/views/main-shuju/main-navbar.vue
  4. 5
      src/views/pages/login.vue

7
src/router/index.js

@ -34,11 +34,8 @@ export const pageRoutes = [
}, },
}, },
{ {
path: "/", path: "/index",
name: "index", name: "index",
redirect: {
path: "/main/lingshan-home-index",
},
component: () => import("@/views/pages/index"), component: () => import("@/views/pages/index"),
}, },
{ {
@ -56,7 +53,7 @@ export const moduleRoutes = {
component: () => import("@/views/main"), component: () => import("@/views/main"),
name: "main", name: "main",
redirect: { redirect: {
path: "/main/shequ-index", name: "home",
}, },
meta: { meta: {
title: "主入口布局", title: "主入口布局",

6
src/views/main-navbar.vue

@ -43,9 +43,9 @@
mode="horizontal" mode="horizontal"
class="aui-navbar__menu mr-auto z-div" class="aui-navbar__menu mr-auto z-div"
> >
<!-- <el-menu-item @click="toIndexPage"> <el-menu-item @click="toIndexPage">
<span>首页</span> <span>首页</span>
</el-menu-item> --> </el-menu-item>
<el-menu-item <el-menu-item
v-show="menu.showFlag==1" v-show="menu.showFlag==1"
@ -159,7 +159,7 @@ export default {
}, },
methods: { methods: {
toIndexPage() { toIndexPage() {
this.$router.replace("/indexWork"); this.$router.replace("/index");
}, },
// menuId() // menuId()
gotoRouteHandle(menuId, idx) { gotoRouteHandle(menuId, idx) {

2
src/views/main-shuju/main-navbar.vue

@ -227,7 +227,7 @@ export default {
}, },
toIndexPage() { toIndexPage() {
this.$router.replace("/indexWork"); this.$router.replace({name:'index'});
}, },
// menuId() // menuId()
gotoRouteHandle(menuId, idx) { gotoRouteHandle(menuId, idx) {

5
src/views/pages/login.vue

@ -162,7 +162,9 @@ export default {
location.href = href; location.href = href;
} else { } else {
localStorage.removeItem("thePageAtExit"); localStorage.removeItem("thePageAtExit");
this.$router.replace({ path: "/main/shequ-index" }); // this.$router.replace({ name: "index" });
this.$router.replace({ name: "index" });
// this.$router.replace({ name: 'index' }).catch(() => {})
} }
}, },
// //
@ -268,6 +270,7 @@ export default {
localStorage.setItem("userType", "work"); localStorage.setItem("userType", "work");
localStorage.setItem("token", res.data.token); localStorage.setItem("token", res.data.token);
console.log(res.data.token,'ccccccc');
this.skipAfterLogin(); this.skipAfterLogin();
}) })
.catch(() => { .catch(() => {

Loading…
Cancel
Save