Authored by TaoHuang

Merge branch 'master' into feature/share

# Conflicts:
#	package.json
1 <template> 1 <template>
2 <Layout class="article-detail"> 2 <Layout class="article-detail">
3 - <ArticleDetailHeader ref="header" class="article-detail-header" v-if="!share" :data="articleInfo" :step="headerAnimateStep" :title-step="headerTitleAnimateStep"> 3 + <ArticleDetailHeader ref="header" class="article-detail-header" v-show="!share" :data="articleInfo" :step="headerAnimateStep" :title-step="headerTitleAnimateStep">
4 <div v-if="articleInfo.articleId && !articleInfo.empty" class="title-main"> 4 <div v-if="articleInfo.articleId && !articleInfo.empty" class="title-main">
5 <div class="title-info" :style="`transform: translate3d(0, ${viewMoreArticles ? '-50%' : '0'}, 0)`"> 5 <div class="title-info" :style="`transform: translate3d(0, ${viewMoreArticles ? '-50%' : '0'}, 0)`">
6 <ArticleItemHeader class="title-info-author" :share="share" :data="authorData" :more="false" @on-follow="onFollowAuthor"></ArticleItemHeader> 6 <ArticleItemHeader class="title-info-author" :share="share" :data="authorData" :more="false" @on-follow="onFollowAuthor"></ArticleItemHeader>
1 <template> 1 <template>
2 <div ref="intro" class="intro-wrap" :class="introClass" :style="introStyle" @click="onExpanding"> 2 <div ref="intro" class="intro-wrap" :class="introClass" :style="introStyle" @click="onExpanding">
3 - <div class="context-title">{{this.data.articleTitle}}</div>  
4 <div v-if="trimIntro" class="intro-content"> 3 <div v-if="trimIntro" class="intro-content">
5 <p class="pre-wrap" @click="toUserPage" v-html="introDecorator"></p> 4 <p class="pre-wrap" @click="toUserPage" v-html="introDecorator"></p>
6 <div ref="introPool" class="intro-pool pre-wrap" v-if="!introHeight" v-html="trimIntroDecorator" > 5 <div ref="introPool" class="intro-pool pre-wrap" v-if="!introHeight" v-html="trimIntroDecorator" >
@@ -206,16 +205,6 @@ export default { @@ -206,16 +205,6 @@ export default {
206 overflow: hidden; 205 overflow: hidden;
207 transition: height 250ms cubic-bezier(0.165, 0.84, 0.44, 1); 206 transition: height 250ms cubic-bezier(0.165, 0.84, 0.44, 1);
208 207
209 - .context-title {  
210 - font-size: 36px;  
211 - color: #222;  
212 - line-height: 56px;  
213 - margin-top: 10px;  
214 - margin-bottom: 16px;  
215 - letter-spacing: 0.68px;  
216 - font-weight: bolder;  
217 - }  
218 -  
219 .intro-content { 208 .intro-content {
220 line-height: 1.7; 209 line-height: 1.7;
221 font-size: 32px; 210 font-size: 32px;
@@ -11,6 +11,8 @@ @@ -11,6 +11,8 @@
11 <ArticleItemSlide v-else :thumb="thumb" :share="share" :data="slideData" :slide-index="slideIndex" :lazy="lazy" @on-praise="onPraise" @change="onChangeSlide"></ArticleItemSlide> 11 <ArticleItemSlide v-else :thumb="thumb" :share="share" :data="slideData" :slide-index="slideIndex" :lazy="lazy" @on-praise="onPraise" @change="onChangeSlide"></ArticleItemSlide>
12 <ProductGroup name="articleTwoColumn" :article-id="data.articleId" :pos-id="0" :index="0" :thumb="thumb" v-if="productListData.length" :share="share" :data="productListData" :lazy="lazy"></ProductGroup> 12 <ProductGroup name="articleTwoColumn" :article-id="data.articleId" :pos-id="0" :index="0" :thumb="thumb" v-if="productListData.length" :share="share" :data="productListData" :lazy="lazy"></ProductGroup>
13 13
  14 + <div class="context-title">{{data.articleTitle}}</div>
  15 +
14 <ArticleDetailIntro :data="introData" :pos-id="posId"></ArticleDetailIntro> 16 <ArticleDetailIntro :data="introData" :pos-id="posId"></ArticleDetailIntro>
15 <ArticleItemTopics :data="topicsData" :share="share"></ArticleItemTopics> 17 <ArticleItemTopics :data="topicsData" :share="share"></ArticleItemTopics>
16 18
@@ -168,6 +170,17 @@ export default { @@ -168,6 +170,17 @@ export default {
168 align-items: center; 170 align-items: center;
169 } 171 }
170 172
  173 +.context-title {
  174 + font-size: 36px;
  175 + color: #222;
  176 + line-height: 56px;
  177 + margin-top: 10px;
  178 + margin-bottom: 16px;
  179 + letter-spacing: 0.68px;
  180 + font-weight: bolder;
  181 + padding: 0 30px;
  182 +}
  183 +
171 .publish-time { 184 .publish-time {
172 font-size: 24px; 185 font-size: 24px;
173 color: #b0b0b0; 186 color: #b0b0b0;
1 <template> 1 <template>
2 <div> 2 <div>
3 <Layout ref="layout" class="article"> 3 <Layout ref="layout" class="article">
4 - <TopicHeader ref="header" :title="topicTitle" v-if="!share" :step="headerAnimateStep" :data="topicSimpleInfo" :share="share" @on-follow="onFollowTopic"> 4 + <TopicHeader ref="header" :title="topicTitle" v-show="!share" :step="headerAnimateStep" :data="topicSimpleInfo" :share="share" @on-follow="onFollowTopic">
5 <template v-if="tabBlockSuctionTop" v-slot:suctionTop> 5 <template v-if="tabBlockSuctionTop" v-slot:suctionTop>
6 <TopicTabBlock :active-type="activeTopicListType" @on-change-tab="onChangeTab"></TopicTabBlock> 6 <TopicTabBlock :active-type="activeTopicListType" @on-change-tab="onChangeTab"></TopicTabBlock>
7 </template> 7 </template>
@@ -13,5 +13,17 @@ @@ -13,5 +13,17 @@
13 text-align: center; 13 text-align: center;
14 border-radius: 10px !important; 14 border-radius: 10px !important;
15 right: 20px !important; 15 right: 20px !important;
  16 + animation: none !important;
  17 + }
  18 +
  19 + .download-go {
  20 + height: 72px !important;
  21 + width: 180px !important;
  22 + font-size: 32px !important;
  23 + line-height: 72px !important;
  24 + text-align: center;
  25 + border-radius: 10px !important;
  26 + right: 20px !important;
  27 + animation: none !important;
16 } 28 }
17 } 29 }
@@ -80,7 +80,8 @@ const getContext = (req) => { @@ -80,7 +80,8 @@ const getContext = (req) => {
80 function getAppPath(req) { 80 function getAppPath(req) {
81 let appPathUrl = req.originalUrl.split('?')[0] || ''; 81 let appPathUrl = req.originalUrl.split('?')[0] || '';
82 const query = Object.assign(req.query, { 82 const query = Object.assign(req.query, {
83 - headerid: -1 83 + headerid: -1,
  84 + toplayoutByH5: 'Y'
84 }); 85 });
85 86
86 let appPath = 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.h5",' + 87 let appPath = 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.h5",' +
@@ -90,6 +91,14 @@ function getAppPath(req) { @@ -90,6 +91,14 @@ function getAppPath(req) {
90 return encodeURI(appPath); 91 return encodeURI(appPath);
91 } 92 }
92 93
  94 +function getShare(req) {
  95 + if ('share' in req.query) {
  96 + return req.query.share === 'true' ? true : false;
  97 + } else {
  98 + return true;
  99 + }
  100 +}
  101 +
93 const handlerError = (err = {}, req, res, next) => { 102 const handlerError = (err = {}, req, res, next) => {
94 if (err.code === 404) { 103 if (err.code === 404) {
95 return res.redirect('/grass/error/404'); 104 return res.redirect('/grass/error/404');
@@ -194,7 +203,7 @@ const render = (route) => { @@ -194,7 +203,7 @@ const render = (route) => {
194 resources, 203 resources,
195 states, 204 states,
196 zk, 205 zk,
197 - download: req.query.share ? true : false, 206 + download: getShare(req),
198 routeHash: routeEncode.getRouter(req), 207 routeHash: routeEncode.getRouter(req),
199 appPath: getAppPath(req) 208 appPath: getAppPath(req)
200 }); 209 });
@@ -267,7 +276,7 @@ const devRender = (route) => { @@ -267,7 +276,7 @@ const devRender = (route) => {
267 resources, 276 resources,
268 states, 277 states,
269 routeHash: routeEncode.getRouter(req), 278 routeHash: routeEncode.getRouter(req),
270 - download: req.query.share ? true : false, 279 + download: getShare(req),
271 appPath: getAppPath(req) 280 appPath: getAppPath(req)
272 }); 281 });
273 282
1 { 1 {
2 "name": "yoho-community-web", 2 "name": "yoho-community-web",
3 - "version": "6.9.8-beta100", 3 + "version": "6.9.10-beta2",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {