|
|
<template>
|
|
|
<div class="top-box clearfix" v-bind:class='{"top-box-left" : this.$parent.$refs.filter.on}'>
|
|
|
<div class="top-box clearfix" v-bind:class='{"top-box-left" : this.$parent.$refs.filter.isVisible,"top-change" : topChange }' v-infinite-scroll="changeTopStatus()">
|
|
|
<span class="icon back" @click="goBack()"></span>
|
|
|
<div class="right">
|
|
|
<span v-if="shareData.isFav" class="icon" @click="collectShop()"></span>
|
|
|
<span v-else class="icon" @click="collectShop()"></span>
|
|
|
<span class="icon" @click="goShare()"></span>
|
|
|
<span v-if="shareData.isBlkShop" v-show="shareData.isFav" class="icon" @click="collectShop()"></span>
|
|
|
<span v-if="shareData.isBlkShop" v-show="!shareData.isFav" class="icon" @click="collectShop()"></span>
|
|
|
<span v-if="shareData.isBlkShop" class="icon" @click="goShare()"></span>
|
|
|
<span class="icon" @click="showFilter()"></span>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -13,8 +13,8 @@ |
|
|
<style>
|
|
|
.top-box {
|
|
|
width: 100%;
|
|
|
height: 60px;
|
|
|
padding: 0 20px;
|
|
|
height: 80px;
|
|
|
padding: 10px 20px;
|
|
|
position: fixed;
|
|
|
top: 60px;
|
|
|
left: 0;
|
...
|
...
|
@@ -45,6 +45,14 @@ |
|
|
.top-box-left {
|
|
|
left: -655px;
|
|
|
}
|
|
|
|
|
|
.top-change {
|
|
|
background-color: #fff;
|
|
|
color: #000;
|
|
|
height: 140px;
|
|
|
top: 0;
|
|
|
padding: 70px 20px 10px;
|
|
|
}
|
|
|
</style>
|
|
|
|
|
|
<script>
|
...
|
...
|
@@ -53,6 +61,11 @@ |
|
|
const tip = require('common/tip');
|
|
|
|
|
|
module.exports = {
|
|
|
data() {
|
|
|
return {
|
|
|
topChange: false
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
|
shareData: {
|
|
|
type: Object
|
...
|
...
|
@@ -91,6 +104,15 @@ |
|
|
},
|
|
|
showFilter() {
|
|
|
this.$parent.$refs.filter.isVisible = !this.$parent.$refs.filter.isVisible;
|
|
|
},
|
|
|
changeTopStatus() {
|
|
|
let topHeight = document.body.scrollTop;
|
|
|
|
|
|
if (topHeight > 100) {
|
|
|
this.topChange = true;
|
|
|
} else {
|
|
|
this.topChange = false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
};
|
...
|
...
|
|