Authored by TaoHuang

fix title and top

<template>
<Layout class="article-detail">
<ArticleDetailHeader ref="header" class="article-detail-header" v-if="!share" :data="articleInfo" :step="headerAnimateStep" :title-step="headerTitleAnimateStep">
<ArticleDetailHeader ref="header" class="article-detail-header" v-show="!share" :data="articleInfo" :step="headerAnimateStep" :title-step="headerTitleAnimateStep">
<div v-if="articleInfo.articleId && !articleInfo.empty" class="title-main">
<div class="title-info" :style="`transform: translate3d(0, ${viewMoreArticles ? '-50%' : '0'}, 0)`">
<ArticleItemHeader class="title-info-author" :share="share" :data="authorData" :more="false" @on-follow="onFollowAuthor"></ArticleItemHeader>
... ...
<template>
<div>
<Layout ref="layout" class="article">
<TopicHeader ref="header" :title="topicTitle" v-if="!share" :step="headerAnimateStep" :data="topicSimpleInfo" :share="share" @on-follow="onFollowTopic">
<TopicHeader ref="header" :title="topicTitle" v-show="!share" :step="headerAnimateStep" :data="topicSimpleInfo" :share="share" @on-follow="onFollowTopic">
<template v-if="tabBlockSuctionTop" v-slot:suctionTop>
<TopicTabBlock :active-type="activeTopicListType" @on-change-tab="onChangeTab"></TopicTabBlock>
</template>
... ...
... ... @@ -13,5 +13,17 @@
text-align: center;
border-radius: 10px !important;
right: 20px !important;
animation: none !important;
}
.download-go {
height: 72px !important;
width: 180px !important;
font-size: 32px !important;
line-height: 72px !important;
text-align: center;
border-radius: 10px !important;
right: 20px !important;
animation: none !important;
}
}
... ...
... ... @@ -80,7 +80,8 @@ const getContext = (req) => {
function getAppPath(req) {
let appPathUrl = req.originalUrl.split('?')[0] || '';
const query = Object.assign(req.query, {
headerid: -1
headerid: -1,
toplayoutByH5: 'Y'
});
let appPath = 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.h5",' +
... ... @@ -90,6 +91,14 @@ function getAppPath(req) {
return encodeURI(appPath);
}
function getShare(req) {
if ('share' in req.query) {
return req.query.share === 'true' ? true : false;
} else {
return true;
}
}
const handlerError = (err = {}, req, res, next) => {
if (err.code === 404) {
return res.redirect('/grass/error/404');
... ... @@ -194,7 +203,7 @@ const render = (route) => {
resources,
states,
zk,
download: req.query.share ? true : false,
download: getShare(req),
routeHash: routeEncode.getRouter(req),
appPath: getAppPath(req)
});
... ... @@ -267,7 +276,7 @@ const devRender = (route) => {
resources,
states,
routeHash: routeEncode.getRouter(req),
download: req.query.share ? true : false,
download: getShare(req),
appPath: getAppPath(req)
});
... ...