|
|
|
@ -0,0 +1,97 @@ |
|
|
|
|
<template> |
|
|
|
|
<div id="header" class="new_header"> |
|
|
|
|
<div class="hd_bar"> |
|
|
|
|
<div class="bd_bar_bd cle"> |
|
|
|
|
<ul class="welcome"> |
|
|
|
|
<li> |
|
|
|
|
<!-- href="#"表示本页不跳转,rel="nofollow" 表示链接不做seo追踪 --> |
|
|
|
|
<a id="favorite_wb" href="#" rel="nofollow">我的特产小店</a> |
|
|
|
|
</li> |
|
|
|
|
<li id="ECS_MEMBERZONE" v-if="userinfo"> |
|
|
|
|
<router-link :to="'/profile'">{{ userinfo.username }}</router-link> |
|
|
|
|
<a @click="logout">退出</a> |
|
|
|
|
</li> |
|
|
|
|
<li id="ECS_MEMBERZONE" v-else> |
|
|
|
|
<router-link :to="'/login'">请登录</router-link> |
|
|
|
|
<s>|</s> |
|
|
|
|
<router-link :to="'/reg'">免费注册</router-link> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
<ul id="userinfo-bar"> |
|
|
|
|
<li class="more-menu"> |
|
|
|
|
<router-link :to="'/profile'">会员中心</router-link> |
|
|
|
|
<router-link :to="'/myorder'">我的订单</router-link> |
|
|
|
|
<router-link :to="'/address'">修改收货地址</router-link> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="hd_main cle"> |
|
|
|
|
<div class="logo"> |
|
|
|
|
<a href="./" class="lizi_logo"><img src="../static/images/logo.jpg" alt=""></a> |
|
|
|
|
</div> |
|
|
|
|
<div class="search_box"> |
|
|
|
|
<form action="search.php" method="get" id="SearchForm" name="searchForm" onsubmit="return checkSearchForm()"> |
|
|
|
|
<input class="sea_input" type="text" name="keywords" id="keyword" value="" autocomplete="off"/> |
|
|
|
|
<input type="hidden" value="k1" name="dataBi"/> |
|
|
|
|
<button type="submit" class="sea_submit">搜索</button> |
|
|
|
|
</form> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="hd_nav"> |
|
|
|
|
<div class="hd_nav_bd cle"> |
|
|
|
|
<div class="main_nav main_nav_hover" id="main_nav" @mouseover="overAllmenu" @mouseout="outAllmenu"> |
|
|
|
|
<div class="main_nav main_nav_hover"> |
|
|
|
|
<a class="#">全部商品分类</a> <i class="iconfont"></i> |
|
|
|
|
</div> |
|
|
|
|
<div class="main_cate" id="J_mainCate" v-show="showmenu"> |
|
|
|
|
<uL> |
|
|
|
|
<li :class="current === index ? 'current': ''" v-for="(item, index) in allMenu" :key="index" |
|
|
|
|
@mouseover="oversubmenu(index)" @mouseout="outsubmenu(index)"> |
|
|
|
|
|
|
|
|
|
</li> |
|
|
|
|
</uL> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script setup> |
|
|
|
|
import {mapGetters} from 'vuex' |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
methods: { |
|
|
|
|
overAllmenu () { |
|
|
|
|
this.showmenu = true |
|
|
|
|
}, |
|
|
|
|
outAllmenu () { |
|
|
|
|
this.showmenu = false |
|
|
|
|
}, |
|
|
|
|
oversubmenu () { |
|
|
|
|
this.current = index |
|
|
|
|
this.showsubmenu = index |
|
|
|
|
}, |
|
|
|
|
outsubmenu () { |
|
|
|
|
this.current = false |
|
|
|
|
this.showsubmenu = -1 |
|
|
|
|
}, |
|
|
|
|
logout () { |
|
|
|
|
this.$store.dispatch('delUser') |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters({ |
|
|
|
|
userinfo: 'userinfo', |
|
|
|
|
cart_lists: 'cart_lists', |
|
|
|
|
totalNum: 'totalNum', |
|
|
|
|
totalPrice: 'totalPrice', |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
|
|
|
|
|
|
</style> |