...
|
...
|
@@ -9,21 +9,27 @@ |
|
|
</div>
|
|
|
</ArticleDetailHeader>
|
|
|
<div ref="coverFigure" class="cover-figure">
|
|
|
<img class="cover-img" :src="coverImage.src" :style="`transform: translate3d(0, ${coverTranslateY}px, 0)`">
|
|
|
<ImageFormat class="cover-img" :src="coverImage.src" :width="coverImage.width" :height="coverImage.height" :style="`transform: translate3d(0, ${coverTranslateY}px, 0)`"></ImageFormat>
|
|
|
</div>
|
|
|
<div ref="authorBlock" class="author-block">
|
|
|
<ArticleItemHeader :share="share" :data="authorData" :lazy="lazy" :more="showMoreOpt" @on-follow="onFollow"></ArticleItemHeader>
|
|
|
</div>
|
|
|
<div class="main-detail">
|
|
|
<div class="article-context" style="height: 1000px;background: #ccc;">
|
|
|
<div class="article-context">
|
|
|
<div class="context-title">{{data.articleTitle}}</div>
|
|
|
<div class="context-rich-text" v-html="data.richText"></div>
|
|
|
</div>
|
|
|
|
|
|
<ArticleItemTopics v-if="data.topicList && data.topicList.length" class="topics-wrap" :data="data" :share="share"></ArticleItemTopics>
|
|
|
|
|
|
<div v-if="recomendProduct.length">
|
|
|
<LayoutTitle class="rec-goods-title">推荐商品</LayoutTitle>
|
|
|
<ProductGroup :data="recomendProduct" model="2"></ProductGroup>
|
|
|
</div>
|
|
|
<ArticleItemTopics class="topics-wrap" :data="data" :share="share"></ArticleItemTopics>
|
|
|
<LayoutTitle class="rec-goods-title">推荐商品</LayoutTitle>
|
|
|
<ProductGroup :data="recomendProduct" model="2"></ProductGroup>
|
|
|
|
|
|
<LayoutTitle class="rec-article-title">{{listTitle}}</LayoutTitle>
|
|
|
</div>
|
|
|
<ArticleDetailFooter class="detail-fixed-footer" @on-comment-click="onComment">
|
|
|
<ArticleDetailFooter class="detail-fixed-footer" v-bind="footerData" @on-comment-click="onComment">
|
|
|
<template v-slot:after>
|
|
|
<div class="article-goods">文中商品</div>
|
|
|
</template>
|
...
|
...
|
@@ -58,57 +64,7 @@ export default { |
|
|
downgrade: false,
|
|
|
showMoreOpt: false,
|
|
|
authorBlock: {},
|
|
|
recomendProduct: [{
|
|
|
"id": 230,
|
|
|
"marketPrice": 390,
|
|
|
"orderBy": 0,
|
|
|
"productId": 142427,
|
|
|
"productImage": "http://img10.static.yhbimg.com/goodsimg/2019/01/16/16/0123e8e8c7243ca83e37e6a11d4a431777.png?imageView2/{mode}/w/{width}/h/{height}",
|
|
|
"productName": "Timberland 插肩印花短袖T恤",
|
|
|
"productSkn": 51085719,
|
|
|
"productType": 1,
|
|
|
"salesPrice": 11
|
|
|
}, {
|
|
|
"id": 232,
|
|
|
"marketPrice": 1290,
|
|
|
"orderBy": 1,
|
|
|
"productId": 142447,
|
|
|
"productImage": "http://img13.static.yhbimg.com/goodsimg/2015/02/13/08/024becd3478789516c2749d5bc0e4e48cc.jpg?imageView2/{mode}/w/{width}/h/{height}",
|
|
|
"productName": "Timberland 女士经典无里衬帆船鞋",
|
|
|
"productSkn": 51085694,
|
|
|
"productType": 1,
|
|
|
"salesPrice": 11
|
|
|
}, {
|
|
|
"id": 234,
|
|
|
"marketPrice": 444,
|
|
|
"orderBy": 2,
|
|
|
"productId": 508376,
|
|
|
"productImage": "http://img13.static.yhbimg.com/goodsimg/2017/03/31/17/021204a24a95b6a5c258e7469e7bbbd22f.jpg?imageView2/{mode}/w/{width}/h/{height}",
|
|
|
"productName": "bigrabbit男手套",
|
|
|
"productSkn": 512587700,
|
|
|
"productType": 1,
|
|
|
"salesPrice": 444
|
|
|
}, {
|
|
|
"id": 236,
|
|
|
"marketPrice": 790,
|
|
|
"orderBy": 3,
|
|
|
"productId": 142413,
|
|
|
"productImage": "http://img10.static.yhbimg.com/goodsimg/2019/01/17/10/01d10b02308ecbfb42176cbf965478181a.jpg?imageView2/{mode}/w/{width}/h/{height}",
|
|
|
"productName": "Timberland 男士休闲短裤116",
|
|
|
"productSkn": 51085737,
|
|
|
"productType": 1,
|
|
|
"salesPrice": 11
|
|
|
}, {
|
|
|
"id": 238,
|
|
|
"marketPrice": 429,
|
|
|
"orderBy": 4,
|
|
|
"productId": 69792,
|
|
|
"productImage": "http://img13.static.yhbimg.com/goodsimg/2014/05/14/03/02e5b2050d3fd73584dd786cadc4eaf68d.jpg?imageView2/{mode}/w/{width}/h/{height}",
|
|
|
"productName": "izzue 碎花拼接T恤",
|
|
|
"productSkn": 51041119,
|
|
|
"productType": 1,
|
|
|
"salesPrice": 11
|
|
|
}],
|
|
|
recomendProduct: [],
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
...
|
...
|
@@ -134,8 +90,12 @@ export default { |
|
|
}
|
|
|
});
|
|
|
|
|
|
let width = Math.min(+this.data.imageWidth, 1000);
|
|
|
|
|
|
return {
|
|
|
src: '//flv01.static.yhbimg.com/grassImg/2019/05/07/12/03a620a29bb8b3a4f508dc8f86f6974a7a.jpg'
|
|
|
src: this.data.coverImage,
|
|
|
width,
|
|
|
height: width * this.data.imageHeight / this.data.imageWidth
|
|
|
};
|
|
|
},
|
|
|
coverTranslateY() {
|
...
|
...
|
@@ -198,6 +158,16 @@ export default { |
|
|
isAuthor: this.data.isAuthor
|
|
|
};
|
|
|
},
|
|
|
footerData() {
|
|
|
return {
|
|
|
favoriteCount: this.data.favoriteCount,
|
|
|
praiseCount: this.data.praiseCount,
|
|
|
commentCount: this.data.commentCount,
|
|
|
hasFavor: this.data.hasFavor,
|
|
|
hasPraise: this.data.hasPraise,
|
|
|
articleId: this.data.articleId
|
|
|
};
|
|
|
},
|
|
|
lazy() {
|
|
|
return this.data.lazy;
|
|
|
}
|
...
|
...
|
@@ -268,12 +238,30 @@ export default { |
|
|
.main-detail {
|
|
|
position: relative;
|
|
|
z-index: 1;
|
|
|
background-color: #fff;
|
|
|
}
|
|
|
|
|
|
.article-context {
|
|
|
padding: 30px;
|
|
|
}
|
|
|
|
|
|
.context-title {
|
|
|
font-size: 34px;
|
|
|
color: #444;
|
|
|
line-height: 52px;
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
|
|
|
.context-rich-text /deep/ {
|
|
|
img {
|
|
|
max-width: 100%!important;
|
|
|
}
|
|
|
|
|
|
p {
|
|
|
font-size: 24px!important;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.topics-wrap {
|
|
|
padding-left: 30px;
|
|
|
margin-bottom: 36px;
|
...
|
...
|
|