Authored by 毕凯

Merge branch 'feature/guangDetail' into 'release/6.1'

Feature/guang detail



See merge request !884
... ... @@ -113,9 +113,8 @@
<span class="iconfont">&#xe604;</span>
</a>
{{/if}}
{{#if relatedReco}}
<div class="post-block related-reco clearfix">
<div class="post-block related-reco clearfix{{#if relatedReco.changeDisplayType}} change-display{{/if}}">
<div class="related-reco-block related-reco-hide">
{{#each relatedReco.goods}}
{{> detail/related-reco isApp=../relatedReco/isApp}}
... ... @@ -123,7 +122,7 @@
</div>
{{#if relatedReco.moreNum}}
<div class="related-reco-more">
<span>展开剩余{{relatedReco.moreNum}}个商品</span>
展开剩余{{relatedReco.moreNum}}个商品<span class="iconfont">&#xe609;</span>
</div>
{{/if}}
</div>
... ...
... ... @@ -18,6 +18,8 @@
<span class="iconfont plus">&#xe624;</span>
</span>
</p>
{{else}}
<a class="go-detail" href="{{url}}">查看详情&nbsp;<span class="iconfont">&#xe604;</span></a>
{{/unlessor}}
</div>
</div>
\ No newline at end of file
... ...
... ... @@ -125,6 +125,7 @@ $relatedRecoMore.on('touchstart', function(e) {
} else {
$relatedRecoBlock.addClass('related-reco-hide');
}
return false;
});
// 微信导航
... ...
... ... @@ -340,8 +340,9 @@ $focus-size: 42px;
background: #fff;
.one-good {
padding: 20px 0;
border-top: 1px solid #e0e0e0;
background-color: #f0f0f0;
margin-bottom: 10px;
border: solid 1px #e0e0e0;
.thumb {
float: left;
... ... @@ -352,17 +353,13 @@ $focus-size: 42px;
}
.content-container {
width: 398px;
width: 404px;
float: left;
font-size: 22px;
margin-left: 20px;
.reco-name {
margin-top: 35px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
padding-right: 30px;
height: 206px;
position: relative;
span {
display: inline-block;
... ... @@ -370,12 +367,41 @@ $focus-size: 42px;
}
.price {
line-height: 65px;
line-height: 53px;
}
.go-detail {
color: #444;
position: absolute;
bottom: 20px;
right: 30px;
}
.iconfont {
font-size: 12px;
}
}
.reco-name {
margin-top: 35px;
overflow: hidden;
text-overflow: ellipsis;
white-space: normal;
height: 60px;
span {
line-height: 30px;
height: 60px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
}
.sale-price {
color: #d62927;
color: #d0021b;
line-height: 1.5;
}
... ... @@ -391,12 +417,20 @@ $focus-size: 42px;
}
.check-detail {
display: inline-block;
background-color: #f0f0f0;
color: #444;
display: block;
background-color: #444;
color: #fff;
border-radius: 20px;
height: 40px !important;
line-height: 40px !important;
text-align: center;
float: right;
padding: 10px 20px;
width: 70px;
font-size: 28px;
span {
vertical-align: middle;
}
}
.check-detail > .plus {
... ... @@ -406,7 +440,7 @@ $focus-size: 42px;
}
.related-reco-hide {
max-height: 490px;
max-height: 430px;
overflow: hidden;
}
... ... @@ -415,16 +449,16 @@ $focus-size: 42px;
}
.related-reco > .related-reco-more {
width: 230px;
display: block;
width: 250px;
height: 40px;
margin-bottom: 50px;
line-height: 40px;
margin: 20px auto 50px;
text-align: center;
font-size: 22px;
color: #fff;
margin-left: auto;
margin-right: auto;
background-color: #444;
padding: 6px 20px;
background-color: #b0b0b0;
padding-left: 15px;
}
.link-block {
... ... @@ -756,6 +790,67 @@ $focus-size: 42px;
video {
width: 100%;
}
.related-reco.change-display {
.one-good {
width: 275px;
float: left;
margin-right: 30px;
margin-bottom: 25px;
.thumb {
width: 275px;
height: 365px;
}
&:nth-child(even) {
margin-right: 0;
}
.content-container {
position: relative;
width: 275px;
margin-left: 0;
height: 130px;
padding: 0 15px;
.price {
height: 50px;
}
}
.reco-name {
margin-top: 20px;
height: 60px;
white-space: normal;
span {
line-height: 30px;
height: 60px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
}
.content-container > p {
position: absolute;
right: 15px;
bottom: 10px;
}
}
.related-reco-more {
display: none;
}
.related-reco-hide {
max-height: auto;
overflow: visible;
}
}
}
.guang-detail-page.menu-open {
... ...
... ... @@ -344,6 +344,13 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
}
}
// 改变关联商品显示形式,false:默认单列多行,true:改成俩列多行
let changeDisplayType = false;
if (_.get(value, 'goods.display_template')) {
changeDisplayType = _.get(value, 'goods.display_template', '1') === '2';
}
// 相关商品
if (_.get(value, 'goods.data', false) ||
_.get(value, 'goods.dataGlobal', false) ||
... ... @@ -372,7 +379,8 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
finalDetail.push({
relatedReco: {
isApp: isApp,
goods: goodsData
goods: goodsData,
changeDisplayType: changeDisplayType
}
});
}
... ...