Showing
4 changed files
with
26 additions
and
5 deletions
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> | 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 |
-
Please register or login to post a comment