Authored by 郭成尧

'店铺头部调整结束'

... ... @@ -72,6 +72,7 @@
des: shareSubTitle,
url: '/product/shop-share?domain=' + this.domain,
img: result.brandBg,
isBlkShop: result.isBlkShop,
shopId: result.shopId, // 不是分享的参数,收藏店铺使用
isFav: result.isFav // 不是分享的参数,收藏店铺使用
};
... ...
<template>
<div v-if="shopInfo.isBlkShop" class="brand-top-box" v-bind:style="{ 'background-image': `url(${shopInfo.brandBg})` }">
<div v-if="shopInfo.isBlkShop" class="brand-top-box" v-lazy:background-image="shopInfo.brandBg | resize 750 478">
<div class="brand-bottom">
<img v-if="shopInfo.brandLogo" v-lazy="shopInfo.brandLogo | resize 80 80" alt="{{ shopInfo.brandName }}">
<div v-else class="brand-title">{{ shopInfo.brandName }}</div>
... ...
<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()">&#xe606;</span>
<div class="right">
<span v-if="shareData.isFav" class="icon" @click="collectShop()">&#xe60d;</span>
<span v-else class="icon" @click="collectShop()">&#xe60c;</span>
<span class="icon" @click="goShare()">&#xe60e;</span>
<span v-if="shareData.isBlkShop" v-show="shareData.isFav" class="icon" @click="collectShop()">&#xe60d;</span>
<span v-if="shareData.isBlkShop" v-show="!shareData.isFav" class="icon" @click="collectShop()">&#xe60c;</span>
<span v-if="shareData.isBlkShop" class="icon" @click="goShare()">&#xe60e;</span>
<span class="icon" @click="showFilter()">&#xe60b;</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;
}
}
}
};
... ...