|
|
@@ -36,13 +36,13 @@
|
|
|
</ul>
|
|
|
<ul class="right-bar-bottom">
|
|
|
<li class="right-bar-item" @mouseenter="loadHistorys()">
|
|
|
- <a href="http://www.usoftmall.com/user#/browsingHistory" class="title" target="_blank">
|
|
|
+ <a @click="goHistory" class="title" target="_blank">
|
|
|
<i class="iconfont icon-zuji icon-xlg"></i>
|
|
|
</a>
|
|
|
- <div class="sidebar-menu" v-if="!user.logged"><a href="/user#/browsingHistory" title="浏览记录" target="_blank">浏览记录</a></div>
|
|
|
+ <div class="sidebar-menu" v-if="!user.logged"><a @click="goHistory" title="浏览记录" target="_blank">浏览记录</a></div>
|
|
|
<div class="sidebar-menu" v-if="user.logged && listMe(history).length == 0"><a href="/user#/browsingHistory" title="浏览记录" target="_blank">浏览记录</a></div>
|
|
|
<div class="foot-record sidebar-menu" v-if="user.logged && listMe(history).length > 0">
|
|
|
- <h3><a href="">浏览历史</a></h3>
|
|
|
+ <h3><a>浏览历史</a></h3>
|
|
|
<dl>
|
|
|
<dd v-for="item in listMe(history)">
|
|
|
<a :href="'/store/' + item.storeid + '/' + item.batchCode" :title="item.code" v-text="item.code" v-if="item.status== 1"></a>
|
|
|
@@ -150,6 +150,17 @@
|
|
|
this.$store.dispatch('user/deleteHistory', {id: id})
|
|
|
this.$store.dispatch('user/loadHistory')
|
|
|
},
|
|
|
+ goHistory: function () {
|
|
|
+ if (!this.user.logged) {
|
|
|
+ this.$http.get('/login/page').then(response => {
|
|
|
+ if (response.data) {
|
|
|
+ this.$router.push('/auth/login')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ window.location.href = '/user#/browsingHistory'
|
|
|
+ }
|
|
|
+ },
|
|
|
goCart: function () {
|
|
|
if (!this.user.logged) {
|
|
|
this.$http.get('/login/page').then(response => {
|