Commit 6fb24019 authored by 张俊's avatar 张俊

菜单调整

parent e2dd1cbe
......@@ -8,11 +8,9 @@
>
<!-- LOGO -->
<router-link to="/" class="bg-logo">
<div class="bg-logo" @click="gotoPage">
<img style="width:140px;height:22px;" src="../assets/imgs/img_logo.png"/>
<!-- <img style="width:40px;height:40px;" :src="logo"/> -->
<!-- <span>{{name}}</span> -->
</router-link>
</div>
<!-- 菜单 -->
<div class="main-menu" v-if="userInfo&& userInfo.system_id">
......@@ -49,7 +47,7 @@
<!-- 信息 -->
<!-- 购物车 -->
<!-- 用户中心 -->
<div class="user-center nav-item" @click="menuAction(systemMenu[0]?systemMenu[0].path:'',systemMenu[0])">
<div class="user-center nav-item">
<span class="user-icon">
<img style="width:24px;height:24px;border-radius:50%;vertical-align:middle;" v-if="userInfo&&userInfo.logo" :src="userInfo&&userInfo.logo" />
<img style="width:24px;height:24px;border-radius:50%;vertical-align:middle;" v-else src="../assets/imgs/home_ic_user.png" />
......@@ -130,20 +128,20 @@ export default {
...mapState({
fontMenu (state) {
let temp = []
state.menu.forEach(e => {
if(e.menuType=='font'){
temp.push(e)
}
});
// state.menu.forEach(e => {
// if(e.menuType=='font'){
// temp.push(e)
// }
// });
return temp
},
managerMenu(state){
let temp = []
state.menu.forEach(e => {
if(e.menuType=='system'){
temp.push(e)
}
});
// state.menu.forEach(e => {
// if(e.menuType=='system'){
// temp.push(e)
// }
// });
return temp
},
systemMenu(state){
......@@ -194,13 +192,12 @@ export default {
// })
},
menuAction(n,parent) {
debugger
//不存在则不跳转
if(!n){
return
}
if (n == "logout") {
this.$axios.get(`/apaas/system/logout`).then(res=>{
this.$axios.get(`/apaas/system/v5/user/logout`).then(res=>{
if(res.data.code=='200'){
this.$router.push('/login')
this.$store.commit('setUserInfo',null)
......@@ -249,7 +246,7 @@ export default {
}else{
//判断是否是同区域内跳转
//非同区域跳转需要改前缀,如apaas/portal/ui跳转到apaas/manage/ui
if(this.$store.state.menuObj[this.path]&&parent.menuType==this.$store.state.menuObj[this.path].menuType){
if(this.$store.state.menuObj[this.path]&&(parent.menuType==this.$store.state.menuObj[this.path].menuType||(['font','system'].includes(parent.menuType)&&['font','system'].includes(this.$store.state.menuObj[this.path].menuType)))){
this.$router.push(path);
}else{
let temp = ''
......@@ -258,10 +255,13 @@ export default {
}else if(this.$store.state.menuObj[path].menuType=='manager'){
temp = '/apaas/manage/ui/#'
}
window.location.href = temp+path
window.open(temp+path)
}
}
},
gotoPage(){
window.open(`/apaas/portal/ui/#/`)
},
intoCartDetail() {
this.$router.push({ name: "shopCart" });
},
......@@ -458,6 +458,7 @@ export default {
line-height: 1;
margin: 0 50px 0 20px;
text-decoration: none;
cursor: pointer;
> span {
font-size: 24px;
......@@ -652,15 +653,15 @@ export default {
padding-left: 32px;
position: inherit;
&::before{
content:'';
width: 1px;
height: 24px;
background-color: #5c6da4;
position: absolute;
left: 0;
top: 16px;
}
// &::before{
// content:'';
// width: 1px;
// height: 24px;
// background-color: #5c6da4;
// position: absolute;
// left: 0;
// top: 16px;
// }
}
// 用户中心
.user-center {
......
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