Authored by yyq

page intro

... ... @@ -158,8 +158,12 @@ function getListData(params, channel) {
return redis.all([
['hmget', `category:description:${md5(sortName)}`, 'description']
]).then(descr => {
_.set(finalResult, 'list.pageIntro', `<em class="stage">${sortName}</em>${_.get(descr, '[0][0]')}`);
]).then(desc => {
desc = _.get(desc, '[0][0]');
if (desc) {
_.set(finalResult, 'list.pageIntro', {title: sortName, intro: desc});
}
return Object.assign({}, seo, finalResult);
});
... ...
... ... @@ -234,7 +234,7 @@ function _getBaseShopData(channel, params, shopInfo) {
shopId: shopId,
brand: Object.assign({
brandShopAd: true,
pageIntro: _.truncate(pageIntro, {length: 300, omission: more})
pageIntro: {title: shopName, intro: _.truncate(pageIntro, {length: 300, omission: more})}
}, searchHandler.handlePathNavData({brandName: shopName}, params, 'shop', channel)),
};
... ...
... ... @@ -109,9 +109,12 @@
{{> product/standard-content}}
{{#if pageIntro}}
<h1 class="page-intro">{{{pageIntro}}}</h1>
{{/if}}
{{# pageIntro}}
<div class="page-intro">
{{#if title}}<h1 class="page-title">{{title}}</h1>{{/if}}
{{{intro}}}
</div>
{{/ pageIntro}}
{{> product/recommend-keywords goodsInfo=@root.recommendKeywordsInfo}}
... ...
... ... @@ -217,6 +217,10 @@
.brand-about {
font-size: 12px;
line-height: 150%;
img {
max-width: 100%;
}
}
.sort-intro {
... ... @@ -277,8 +281,9 @@
font-size: 13px;
word-break: break-all;
.stage {
.page-title {
font-size: 20px;
display: inline-block;
}
.blue {
... ...