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

菜单调整

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