Commit 0c04363c authored by 张俊's avatar 张俊

[feat](路由): 路由跳转调整

parent 0dc540a1
......@@ -164,8 +164,6 @@ steps:
path: /var/run/docker.sock
pull: always
environment:
http_proxy: http://10.11.92.33:1282
https_proxy: http://10.11.92.33:1282
REGISTRY_USER:
from_secret: REGISTRY_USER
REGISTRY_PASSWORD:
......@@ -182,8 +180,6 @@ steps:
path: /var/run/docker.sock
pull: always
environment:
http_proxy: http://10.11.92.33:1282
https_proxy: http://10.11.92.33:1282
REGISTRY_USER:
from_secret: REGISTRY_USER
REGISTRY_PASSWORD:
......@@ -200,8 +196,6 @@ steps:
path: /var/run/docker.sock
pull: always
environment:
http_proxy: http://10.11.92.33:1282
https_proxy: http://10.11.92.33:1282
REGISTRY_USER:
from_secret: REGISTRY_USER
REGISTRY_PASSWORD:
......@@ -218,8 +212,6 @@ steps:
path: /var/run/docker.sock
pull: always
environment:
http_proxy: http://10.11.92.33:1282
https_proxy: http://10.11.92.33:1282
REGISTRY_USER:
from_secret: REGISTRY_USER
REGISTRY_PASSWORD:
......
<template>
<div id="app" @click="readFlag = false">
<el-config-provider>
<bg-menu :path="nowParent.path" v-if="menuShow" @openMsg="openMsg"></bg-menu>
<div class="container" :class="menuShow ? '' : 'full_screen'" v-if="pageShow">
<bg-menu :path="nowParent.path" @openMsg="openMsg"></bg-menu>
<div class="container" v-if="pageShow">
<!-- <bg-nav :highlightParentRule="highlightParentRule" :title="nowParent.menuName" width="208px" :list="nowParent.children" v-show="navShow" class="con-nav" /> -->
<bg-nav
v-if="nowParent.children"
......@@ -91,9 +91,6 @@ export default {
return "";
}
},
menuShow() {
return false || !["/ui-example"].includes(this.$route.path);
},
},
watch: {
msgBoxFlag(n, o) {
......
......@@ -7,7 +7,7 @@
}">
<!-- LOGO -->
<router-link to="/" class="bg-logo">
<img style="width: 140px; height: 22px" src="../assets/imgs/img_logo.png" />
<span>智能运维管理平台</span>
</router-link>
<!-- 菜单 -->
......@@ -162,7 +162,7 @@ export default {
...mapState({
fontMenu(state) {
let temp = [];
state.menu.forEach((e) => {
state.menu?.forEach((e) => {
if (e.dict_group_id == "2cb4f767-fad7-44f2-afa3-f055e15dd2b6") {
//font
temp.push(e);
......@@ -172,7 +172,7 @@ export default {
},
managerMenu(state) {
let temp = [];
state.menu.forEach((e) => {
state.menu?.forEach((e) => {
if (e.dict_group_id == "64c156e0-bfff-4bfc-a63a-56effe130a25") {
temp.push(e);
}
......@@ -182,7 +182,7 @@ export default {
systemMenu(state) {
const { is_admin } = state.userInfo;
let temp = [];
state.menu.forEach((e) => {
state.menu?.forEach((e) => {
if (e.dict_group_id == "26d3903a-863e-4efc-b53e-0fb8772ddaa4") {
// 业务系统用户和组织管理员配置了后台管理,将其隐藏
if (is_admin < 3 && e.menuName === "管理中心") {
......
......@@ -81,7 +81,7 @@ function getMenuObj(menu, parentRowPath, menuObj) {
}
});
}
store.commit("setWhiteList", ["/", "/login", "/register", "/password"]);
store.commit("setWhiteList", ["/login", "/register", "/password"]);
Promise.all([getUser(), getMenu("79a8f214-db78-4db7-9c28-db66276b4be2")])
.then((res) => {
if (res[0].data.code == 200 && res[1].data.code == 200) {
......
<template>
<div style="width:100%;height:calc(100% - 10px);background-color:#fff;text-align:center;">
<img src="../assets/imgs/welcom.png" alt="" style="margin-top:150px;">
<p style="font-size:18px;">欢迎进入BD-Apaas5系统~</p>
<p style="font-size:18px;">欢迎进入智能运维管理平台系统~</p>
</div>
</template>
......
......@@ -59,11 +59,11 @@ function inWhiteList(toPath) {
router.beforeEach((to, from, next) => {
const userInfo = store.state.userInfo;
//已登录不可跳转登陆页
if (userInfo && (to.path == "/login" || to.path == "/")) {
next({
path: "/develop/account",
});
//已登录不可跳转登陆页 || to.path == "/" 去除首页跳转判断
if (userInfo && (to.path == "/login" )) {
return next({
path: "/",
})
}
// 检查to.path是否存在于免登陆白名单
......@@ -74,7 +74,7 @@ router.beforeEach((to, from, next) => {
// 根据配置判断是否跳转第三方登录,跳转第三方登录则不跳login
// axios封装中也需要对是否登录过期进行判断,如果登录过期,则跳转登录页,具体跳转地址根据配置来·
if (!userInfo) {
next({
return next({
path: "/login",
});
} else {
......@@ -83,7 +83,7 @@ router.beforeEach((to, from, next) => {
//判读是否匹配,否则跳转404
if (to.matched.length !== 0) {
next();
return next();
} else {
return next({
path: "/404",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment