buyer端的导航条下拉

master
pikachu 2022-04-12 18:03:31 +08:00
parent df408e640a
commit 9e0a681e01
1 changed files with 20 additions and 3 deletions

View File

@ -3,7 +3,7 @@
<div class="nav-con">
<div
class="all-categories hover-pointer"
@mouseenter="showFirstList = true"
@mouseenter="showFirstLists"
@mouseleave="showFirstList = false"
>
全部商品分类
@ -16,6 +16,7 @@
@click="linkTo(item.url)"
>
{{ item.name }}
<!-- {{item}} -->
</li>
</ul>
</div>
@ -150,6 +151,22 @@ export default {
},
},
methods: {
showFirstLists(){
this.showFirstList = true;
if(
localStorage.getItem("category") &&
localStorage.getItem("category_expiration_time")
) {
// this.getCate();
//
if (new Date() > localStorage.getItem("category_expiration_time")) {
this.getCate();
return;
}
this.cateList = JSON.parse(localStorage.getItem("category"));
// this.$Message.info(cateList)
}
},
getCate() {
//
if (this.hover) return false;