Commit a0a451bf authored by 黄奎's avatar 黄奎

页面修改

parent e9579653
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
width: 300px; width: 300px;
float:right; float: right;
} }
.marinRightList ul { .marinRightList ul {
...@@ -285,7 +285,8 @@ ...@@ -285,7 +285,8 @@
<div class="is-show-menu-2" v-if="isShowOne" @click="showTwo=true,isShowOne=false">>></div> <div class="is-show-menu-2" v-if="isShowOne" @click="showTwo=true,isShowOne=false">>></div>
<div class="leftMenu1"> <div class="leftMenu1">
<div class="aside-logo"> <div class="aside-logo">
<div class="asideInner" @click="CommonJump('zanIndex'),firstCked=0,showTwo=false">{{currentUser.MallName}}</div> <div class="asideInner" @click="CommonJump('zanIndex'),firstCked=0,showTwo=false">{{currentUser.MallName}}
</div>
</div> </div>
<ul> <ul>
<li class="menu-item" @mouseover="mouseOver(item)" @mouseout="mouseOutMenu()" v-for="(item,index) in MenuList" <li class="menu-item" @mouseover="mouseOver(item)" @mouseout="mouseOutMenu()" v-for="(item,index) in MenuList"
...@@ -381,9 +382,9 @@ ...@@ -381,9 +382,9 @@
}, },
created() { created() {
this.currentUser = this.getLocalStorage(); this.currentUser = this.getLocalStorage();
// this.$router.push({ // this.$router.push({
// path: 'zanIndex' // path: 'zanIndex'
// }); // });
}, },
methods: { methods: {
...@@ -426,7 +427,35 @@ ...@@ -426,7 +427,35 @@
path: item.MenuUrl path: item.MenuUrl
}); });
} }
} },
refreshpage() {
var isFind = 0;
let path = this.$route.path.split("?")[0];
if (this.MenuList && this.MenuList.length > 0) {
this.MenuList.forEach(item => {
if (item.SubList && item.SubList.length) {
item.SubList.forEach(subItem => {
if (isFind == 0 && subItem.MenuUrl == path) {
isFind = 1;
this.defaultActive = subItem.MenuId + '';
this.firstCked = item.MenuId + '';
this.mouseOver(item);
}
if (isFind == 0 && subItem.ThirdList && subItem.ThirdList.length > 0) {
subItem.ThirdList.forEach(childItem => {
if (isFind == 0 && childItem.MenuUrl == path) {
isFind = 1;
this.defaultActive = childItem.MenuId + '';
this.firstCked = item.MenuId + '';
this.mouseOver(item);
}
})
}
});
}
});
}
},
}, },
mounted() { mounted() {
this.getMenuList(); this.getMenuList();
...@@ -435,6 +464,15 @@ ...@@ -435,6 +464,15 @@
window.onresize = () => { window.onresize = () => {
this.Height = document.documentElement.clientHeight - 60 this.Height = document.documentElement.clientHeight - 60
} }
this.refreshpage();
},
watch: {
MenuList: {
handler: function (val, oldVal) {
this.refreshpage();
},
deep: true
}
} }
}; };
......
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