Merge branch 'feature/brand' into develop
Showing
5 changed files
with
30 additions
and
19 deletions
@@ -27,6 +27,11 @@ const getShopData = params => { | @@ -27,6 +27,11 @@ const getShopData = params => { | ||
27 | 27 | ||
28 | if (result[0].code === 200) { | 28 | if (result[0].code === 200) { |
29 | 29 | ||
30 | + /* 品牌名称 */ | ||
31 | + Object.assign(finalResult, { | ||
32 | + brandName: result[0].data.brand_name | ||
33 | + }); | ||
34 | + | ||
30 | /* 品牌是否有店铺 */ | 35 | /* 品牌是否有店铺 */ |
31 | if (result[0].data.shop_id) { | 36 | if (result[0].data.shop_id) { |
32 | 37 | ||
@@ -48,9 +53,9 @@ const getShopData = params => { | @@ -48,9 +53,9 @@ const getShopData = params => { | ||
48 | 53 | ||
49 | /* 取店铺的基本信息 */ | 54 | /* 取店铺的基本信息 */ |
50 | Object.assign(finalResult, { | 55 | Object.assign(finalResult, { |
51 | - brandLogo: subResult[0].data.shop_logo, | ||
52 | - brandName: subResult[0].data.shop_name, | ||
53 | - brandIntro: subResult[0].data.shop_intro, | 56 | + shopLogo: subResult[0].data.shop_logo, |
57 | + shopName: subResult[0].data.shop_name, | ||
58 | + shopIntro: subResult[0].data.shop_intro, | ||
54 | isFav: subResult[0].data.is_favorite === 'Y' | 59 | isFav: subResult[0].data.is_favorite === 'Y' |
55 | }); | 60 | }); |
56 | 61 |
1 | <template> | 1 | <template> |
2 | <div class="brand-share"> | 2 | <div class="brand-share"> |
3 | - <img class="brand-top-box" v-bind:src="shopInfo.brandBg | resize 750 478"> | ||
4 | - <div class="brand-title">{{ shopInfo.brandName }}</div> | ||
5 | - <div class="brand-intro">{{ shopInfo.brandIntro }}</div> | 3 | + <img class="brand-top-box" v-bind:src="shopInfo.shopBg | resize 750 478"> |
4 | + <div class="brand-title">{{ shopInfo.shopName }}</div> | ||
5 | + <div class="brand-intro">{{ shopInfo.shopIntro }}</div> | ||
6 | <div class="tip">进入 BLK 选购潮品</div> | 6 | <div class="tip">进入 BLK 选购潮品</div> |
7 | <div class="icon arrow"></div> | 7 | <div class="icon arrow"></div> |
8 | - <a href="//m.yohoblk.com"><img v-bind:src="shopInfo.brandBg | resize 752 365"></a> | 8 | + <a href="//m.yohoblk.com"><img v-bind:src="shopInfo.shopBg | resize 752 365"></a> |
9 | </div> | 9 | </div> |
10 | <share-bottom></share-bottom> | 10 | <share-bottom></share-bottom> |
11 | </template> | 11 | </template> |
@@ -64,10 +64,10 @@ | @@ -64,10 +64,10 @@ | ||
64 | watch: { | 64 | watch: { |
65 | shopInfo() { | 65 | shopInfo() { |
66 | share({ | 66 | share({ |
67 | - title: this.shopInfo.brandName, | 67 | + title: this.shopInfo.shopName, |
68 | link: location.href, | 68 | link: location.href, |
69 | desc: this.shopInfo.shareSubTitle, | 69 | desc: this.shopInfo.shareSubTitle, |
70 | - imgUrl: this.shopInfo.brandBg | 70 | + imgUrl: this.shopInfo.shopBg |
71 | }); | 71 | }); |
72 | } | 72 | } |
73 | }, | 73 | }, |
@@ -74,11 +74,13 @@ | @@ -74,11 +74,13 @@ | ||
74 | this.shopInfo = result; | 74 | this.shopInfo = result; |
75 | this.shopInfo.showBrandInfo = true; | 75 | this.shopInfo.showBrandInfo = true; |
76 | this.shareData = { | 76 | this.shareData = { |
77 | - title: result.brandName, | 77 | + title: result.shopName, |
78 | des: shareSubTitle, | 78 | des: shareSubTitle, |
79 | - url: '/product/shop/share?domain=' + this.domain, | ||
80 | - img: result.brandBg, | 79 | + url: '/product/shop/share?domain=' + locationQuery.domain, |
80 | + img: result.shopBg, | ||
81 | isBlkShop: result.isBlkShop, | 81 | isBlkShop: result.isBlkShop, |
82 | + domain: locationQuery.domain, | ||
83 | + brandName: result.brandName, | ||
82 | shopId: result.shopId, // 不是分享的参数,收藏店铺使用 | 84 | shopId: result.shopId, // 不是分享的参数,收藏店铺使用 |
83 | isFav: result.isFav // 不是分享的参数,收藏店铺使用 | 85 | isFav: result.isFav // 不是分享的参数,收藏店铺使用 |
84 | }; | 86 | }; |
@@ -104,8 +106,7 @@ | @@ -104,8 +106,7 @@ | ||
104 | $.post(this.url, Object.assign({ | 106 | $.post(this.url, Object.assign({ |
105 | order: this.sort, | 107 | order: this.sort, |
106 | page: this.page | 108 | page: this.page |
107 | - }, this.filter, locationQuery)) | ||
108 | - .done(result => { | 109 | + }, this.filter, locationQuery)).done(result => { |
109 | this.productList = result.data.productList; | 110 | this.productList = result.data.productList; |
110 | this.filterConfig = result.data.filter; | 111 | this.filterConfig = result.data.filter; |
111 | }).fail(error => { | 112 | }).fail(error => { |
1 | <template> | 1 | <template> |
2 | - <div v-if="shopInfo.isBlkShop" class="brand-top-box" v-lazy:background-image="shopInfo.brandBg | resize 750 478"> | 2 | + <div v-if="shopInfo.isBlkShop" class="brand-top-box" v-lazy:background-image="shopInfo.shopBg | resize 750 478"> |
3 | <div class="brand-bottom"> | 3 | <div class="brand-bottom"> |
4 | - <img v-if="shopInfo.brandLogo" v-lazy="shopInfo.brandLogo | resize 80 80" alt="{{ shopInfo.brandName }}"> | ||
5 | - <div v-else class="brand-title">{{ shopInfo.brandName }}</div> | 4 | + <img v-if="shopInfo.brandLogo" v-lazy="shopInfo.brandLogo | resize 80 80" alt="{{ shopInfo.shopName }}"> |
5 | + <div v-else class="brand-title">{{ shopInfo.shopName }}</div> | ||
6 | <hr> | 6 | <hr> |
7 | - <div v-show="showMore" transition="brand-intro" v-bind:class="{ 'brand-short': !showMore }">{{ shopInfo.brandIntro }}</div> | 7 | + <div v-show="showMore" transition="brand-intro" v-bind:class="{ 'brand-short': !showMore }">{{ shopInfo.shopIntro }}</div> |
8 | </div> | 8 | </div> |
9 | <div v-if="!showMore" class="showmore expand" @click="introTrans()"><span class="icon"></span></div> | 9 | <div v-if="!showMore" class="showmore expand" @click="introTrans()"><span class="icon"></span></div> |
10 | <div v-else class="showmore collapse" @click="introTrans()"><span class="icon"></span></div> | 10 | <div v-else class="showmore collapse" @click="introTrans()"><span class="icon"></span></div> |
1 | <template> | 1 | <template> |
2 | - <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()"> | 2 | + <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()"> |
3 | <span class="icon icon-back back" @click="goBack()"></span> | 3 | <span class="icon icon-back back" @click="goBack()"></span> |
4 | + <span v-if="!shareData.isBlkShop">{{shareData.brandName}}</span> | ||
4 | <div class="right"> | 5 | <div class="right"> |
5 | <span v-if="shareData.isBlkShop" v-show="shareData.isFav" class="icon" @click="collectShop()"></span> | 6 | <span v-if="shareData.isBlkShop" v-show="shareData.isFav" class="icon" @click="collectShop()"></span> |
6 | <span v-if="shareData.isBlkShop" v-show="!shareData.isFav" class="icon" @click="collectShop()"></span> | 7 | <span v-if="shareData.isBlkShop" v-show="!shareData.isFav" class="icon" @click="collectShop()"></span> |
@@ -21,6 +22,7 @@ | @@ -21,6 +22,7 @@ | ||
21 | z-index: 99; | 22 | z-index: 99; |
22 | color: #fff; | 23 | color: #fff; |
23 | font-size: 48px; | 24 | font-size: 48px; |
25 | + text-align: center; | ||
24 | 26 | ||
25 | .back { | 27 | .back { |
26 | width: 60px; | 28 | width: 60px; |
@@ -112,6 +114,9 @@ | @@ -112,6 +114,9 @@ | ||
112 | this.topChange = false; | 114 | this.topChange = false; |
113 | } | 115 | } |
114 | } | 116 | } |
117 | + }, | ||
118 | + created() { | ||
119 | + this.domain = this.shareData.domain; | ||
115 | } | 120 | } |
116 | }; | 121 | }; |
117 | </script> | 122 | </script> |
-
Please register or login to post a comment