Authored by 郭成尧

Merge branch 'feature/brand' into develop

... ... @@ -27,6 +27,11 @@ const getShopData = params => {
if (result[0].code === 200) {
/* 品牌名称 */
Object.assign(finalResult, {
brandName: result[0].data.brand_name
});
/* 品牌是否有店铺 */
if (result[0].data.shop_id) {
... ... @@ -48,9 +53,9 @@ const getShopData = params => {
/* 取店铺的基本信息 */
Object.assign(finalResult, {
brandLogo: subResult[0].data.shop_logo,
brandName: subResult[0].data.shop_name,
brandIntro: subResult[0].data.shop_intro,
shopLogo: subResult[0].data.shop_logo,
shopName: subResult[0].data.shop_name,
shopIntro: subResult[0].data.shop_intro,
isFav: subResult[0].data.is_favorite === 'Y'
});
... ...
<template>
<div class="brand-share">
<img class="brand-top-box" v-bind:src="shopInfo.brandBg | resize 750 478">
<div class="brand-title">{{ shopInfo.brandName }}</div>
<div class="brand-intro">{{ shopInfo.brandIntro }}</div>
<img class="brand-top-box" v-bind:src="shopInfo.shopBg | resize 750 478">
<div class="brand-title">{{ shopInfo.shopName }}</div>
<div class="brand-intro">{{ shopInfo.shopIntro }}</div>
<div class="tip">进入 BLK 选购潮品</div>
<div class="icon arrow">&#xe602;</div>
<a href="//m.yohoblk.com"><img v-bind:src="shopInfo.brandBg | resize 752 365"></a>
<a href="//m.yohoblk.com"><img v-bind:src="shopInfo.shopBg | resize 752 365"></a>
</div>
<share-bottom></share-bottom>
</template>
... ... @@ -64,10 +64,10 @@
watch: {
shopInfo() {
share({
title: this.shopInfo.brandName,
title: this.shopInfo.shopName,
link: location.href,
desc: this.shopInfo.shareSubTitle,
imgUrl: this.shopInfo.brandBg
imgUrl: this.shopInfo.shopBg
});
}
},
... ...
... ... @@ -74,11 +74,13 @@
this.shopInfo = result;
this.shopInfo.showBrandInfo = true;
this.shareData = {
title: result.brandName,
title: result.shopName,
des: shareSubTitle,
url: '/product/shop/share?domain=' + this.domain,
img: result.brandBg,
url: '/product/shop/share?domain=' + locationQuery.domain,
img: result.shopBg,
isBlkShop: result.isBlkShop,
domain: locationQuery.domain,
brandName: result.brandName,
shopId: result.shopId, // 不是分享的参数,收藏店铺使用
isFav: result.isFav // 不是分享的参数,收藏店铺使用
};
... ... @@ -104,8 +106,7 @@
$.post(this.url, Object.assign({
order: this.sort,
page: this.page
}, this.filter, locationQuery))
.done(result => {
}, this.filter, locationQuery)).done(result => {
this.productList = result.data.productList;
this.filterConfig = result.data.filter;
}).fail(error => {
... ...
<template>
<div v-if="shopInfo.isBlkShop" class="brand-top-box" v-lazy:background-image="shopInfo.brandBg | resize 750 478">
<div v-if="shopInfo.isBlkShop" class="brand-top-box" v-lazy:background-image="shopInfo.shopBg | 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>
<img v-if="shopInfo.brandLogo" v-lazy="shopInfo.brandLogo | resize 80 80" alt="{{ shopInfo.shopName }}">
<div v-else class="brand-title">{{ shopInfo.shopName }}</div>
<hr>
<div v-show="showMore" transition="brand-intro" v-bind:class="{ 'brand-short': !showMore }">{{ shopInfo.brandIntro }}</div>
<div v-show="showMore" transition="brand-intro" v-bind:class="{ 'brand-short': !showMore }">{{ shopInfo.shopIntro }}</div>
</div>
<div v-if="!showMore" class="showmore expand" @click="introTrans()"><span class="icon">&#xe602;</span></div>
<div v-else class="showmore collapse" @click="introTrans()"><span class="icon">&#xe617;</span></div>
... ...
<template>
<div class="top-box clearfix" v-bind:class='{"top-box-left" : this.$parent.$refs.filter.isVisible,"top-change" : topChange || !this.shareData.isBlkShop}' v-infinite-scroll="changeTopStatus()">
<div class="top-box clearfix" v-bind:class='{"top-box-left" : this.$parent.$refs.filter.isVisible,"top-change" : topChange || !shareData.isBlkShop}' v-infinite-scroll="changeTopStatus()">
<span class="icon icon-back back" @click="goBack()"></span>
<span v-if="!shareData.isBlkShop">{{shareData.brandName}}</span>
<div class="right">
<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>
... ... @@ -21,6 +22,7 @@
z-index: 99;
color: #fff;
font-size: 48px;
text-align: center;
.back {
width: 60px;
... ... @@ -112,6 +114,9 @@
this.topChange = false;
}
}
},
created() {
this.domain = this.shareData.domain;
}
};
</script>
... ...