|
|
@@ -2,19 +2,17 @@
|
|
|
<div>
|
|
|
<div class="right-bar">
|
|
|
<ul class="right-bar-center">
|
|
|
- <li class="right-bar-item">
|
|
|
+ <li class="right-bar-item" @mouseenter="loadCarCount()">
|
|
|
<a @click="goCart" class="title" target="_blank">
|
|
|
<i class="iconfont icon-shopping-cart icon-xlg"></i>
|
|
|
</a>
|
|
|
<div class="sidebar-menu"><a @click="goCart" title="我的购物车" target="_blank">我的购物车<em><span>(<span v-text="cartCount.count || 0"></span>)</span></em></a></div>
|
|
|
</li>
|
|
|
<li class="right-bar-item">
|
|
|
- <el-button type="text" @click="dialogVisible = true">
|
|
|
- <a class="title">
|
|
|
+ <a @click="dialogVisible = true" class="title">
|
|
|
<i class="iconfont icon-liuyan icon-xlg"></i>
|
|
|
+ <div class="sidebar-menu"><a title="留言板" target="_blank">留言板</a></div>
|
|
|
</a>
|
|
|
- <div class="sidebar-menu"><a title="留言板" target="_blank">留言板</a></div>
|
|
|
- </el-button>
|
|
|
</li>
|
|
|
<li class="right-bar-item contact-menu">
|
|
|
<a href="http://wpa.qq.com/msgrd?v=3&uin=3432892085&site=www.ubtoc.com&menu=yes" target="_blank" class="title">
|
|
|
@@ -37,7 +35,7 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
<ul class="right-bar-bottom">
|
|
|
- <li class="right-bar-item">
|
|
|
+ <li class="right-bar-item" @mouseenter="loadHistorys()">
|
|
|
<a href="http://www.usoftmall.com/user#/browsingHistory" class="title" target="_blank">
|
|
|
<i class="iconfont icon-zuji icon-xlg"></i>
|
|
|
</a>
|
|
|
@@ -115,12 +113,6 @@
|
|
|
return {}
|
|
|
}
|
|
|
},
|
|
|
- mounted () {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.loadHistorys()
|
|
|
- this.loadCarCount()
|
|
|
- })
|
|
|
- },
|
|
|
methods: {
|
|
|
listenPage: function (p) {
|
|
|
this.page = p
|
|
|
@@ -135,10 +127,18 @@
|
|
|
})
|
|
|
},
|
|
|
loadHistorys () {
|
|
|
- this.$store.dispatch('user/loadHistory')
|
|
|
+ if (this.user.logged) {
|
|
|
+ if (!this.history.length) {
|
|
|
+ this.$store.dispatch('user/loadHistory')
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
loadCarCount () {
|
|
|
- this.$store.dispatch('user/CarCount')
|
|
|
+ if (this.user.logged) {
|
|
|
+ if (!this.cartCount.count) {
|
|
|
+ this.$store.dispatch('user/CarCount')
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
toTop () {
|
|
|
scrollTo('body', 300)
|
|
|
@@ -148,7 +148,7 @@
|
|
|
},
|
|
|
deleteHistory (item, id) {
|
|
|
this.$store.dispatch('user/deleteHistory', {id: id})
|
|
|
- this.loadHistorys()
|
|
|
+ this.$store.dispatch('user/loadHistory')
|
|
|
},
|
|
|
goCart: function () {
|
|
|
if (!this.user.logged) {
|
|
|
@@ -204,6 +204,61 @@
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
+ /*查看*/
|
|
|
+ #image-box .x-floating-wrap {
|
|
|
+ position: fixed;
|
|
|
+ z-index: 99998;
|
|
|
+ background: #000;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ opacity: 0.5;
|
|
|
+ }
|
|
|
+ #image-box .x-floating {
|
|
|
+ position: fixed;
|
|
|
+ z-index: 99999;
|
|
|
+ top: 60px;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ text-align: center;
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
+ #image-box .x-floating img {
|
|
|
+ margin: auto auto;
|
|
|
+ max-width: 100%;
|
|
|
+ max-height: 80%;
|
|
|
+ -webkit-user-select: none;
|
|
|
+ -moz-user-select: none;
|
|
|
+ -ms-user-select: none;
|
|
|
+ user-select: none
|
|
|
+ }
|
|
|
+
|
|
|
+ #image-box .x-close-wrap {
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ right: 0;
|
|
|
+ z-index: 100000;
|
|
|
+ width: 120px;
|
|
|
+ height: 120px;
|
|
|
+ margin: -60px -60px 0 0;
|
|
|
+ border-radius: 100%;
|
|
|
+ background: #000;
|
|
|
+ opacity: .3
|
|
|
+ }
|
|
|
+
|
|
|
+ #image-box .x-close-wrap a {
|
|
|
+ position: absolute;
|
|
|
+ left: 25px;
|
|
|
+ bottom: 25px;
|
|
|
+ font-size: 42px;
|
|
|
+ color: #fff
|
|
|
+ }
|
|
|
+ #image-box .x-close-wrap:hover {
|
|
|
+ opacity: .7
|
|
|
+ }
|
|
|
+
|
|
|
a[disabled] {
|
|
|
cursor: not-allowed;
|
|
|
}
|