Authored by 毕凯

Merge branch 'feature/rmBaiduIdJson' into 'gray'

'移除百度结构化数据代码'



See merge request !1221
... ... @@ -228,8 +228,6 @@ const index = (req, res, next) => {
data.guang.author.url = helpers.https(url);
}
let guang = data.guang;
let singleImages = _.filter(detail.getArticleContent, {singleImage: {template_name: 'single_image'}});
let mipPic = _.get(singleImages, '[0].singleImage.data[0].src', '');
guang.detail = {
id: _.get(detail, 'getArticle.id'),
... ... @@ -305,15 +303,7 @@ const index = (req, res, next) => {
isWeixin: isWeixin,
localCss: true,
isShare: isShare,
id: id,
showAnaJson: {
addBaiduSite: true,
title: data.title,
publishTime: guang.detail.publishTime,
pic: mipPic,
des: guang.shareDesc,
url: `${req.protocol}://m.yohobuy.com/guang/${id}.html`
}
id: id
}, data, parameter));
})().catch(next);
};
... ...
... ... @@ -9,7 +9,6 @@ const newDetailModel = require('../models/new-detail');
const listModel = require('../models/list');
const headerModel = require('../../../doraemon/models/header'); // 头部model
const qs = require('querystring');
const moment = require('moment');
const tdk = require('../../../utils/getTDK');
const helpers = global.yoho.helpers;
... ... @@ -58,12 +57,6 @@ const newDetail = {
let appPath = 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.productDetail","params":' +
JSON.stringify(appParams) +
'}';
let mipPic = _.get(result, 'bannerTop.list[0].img', '');
mipPic = (mipPic ? mipPic : _.get(result, 'bannerTop.img', '')).replace(
/\?(.*)/g,
'?imageView2/{mode}/w/{width}/h/{height}'
);
let title = `【${result.brandName}${result.sortName}${result.goodsName}|YOHO!BUY 有货`;
let description = result.goodsName + ' 有货网仅售' + result.goodsPrice.currentPrice + '元,购买' +
... ... @@ -84,14 +77,6 @@ const newDetail = {
localCss: true,
appPath: appPath,
isMarsApp: req.yoho.isMarsApp, // 判断mars
showAnaJson: {
addBaiduSite: true,
title: title,
publishTime: moment.unix(result.shelveTime).format('YYYY-MM-DDTHH:mm:ss'), // mip日期必填
pic: mipPic,
des: description,
url: `${req.protocol}://m.yohobuy.com/product/${result.productSkn}.html`
},
miniPath: helpers.urlFormat('/api/wechat/miniapp.jpg', {
miniapp_type: 0,
param: result.productSkn,
... ...
... ... @@ -85,8 +85,6 @@
<link rel="apple-touch-startup-image" href="https://cdn.yoho.cn/h5/forios/startup/startup-orange-x.png" media="screen and (min-device-width: 751px) and (max-device-width: 1125px)">
<link rel="apple-touch-startup-image" href="https://cdn.yoho.cn/h5/forios/startup/startup-orange-6.png" media="screen and (min-device-width: 641px) and (max-device-width: 750px)">
<link rel="apple-touch-startup-image" href="https://cdn.yoho.cn/h5/forios/startup/startup-orange-5.png" media="screen and (max-device-width: 640px)">
{{> ld-json}}
</head>
<body class="{{pageStyle}}{{#if isWechat}} wechat-body{{/if}}{{#if width750}} width750{{/if}}{{#if isPassportPage}} passport-body{{/if}}{{#if isStarIndexPage}} star-index-bg{{/if}}{{#if isStarDetailPage}} star-class-body{{/if}}{{#if isInstallmentPage}} installment-body{{/if}}{{#if @root.isMarsApp}} is-mars-app{{/if}}{{#if @root.isNowApp}} is-now-app{{/if}}">
<div class="main-wrap" id="main-wrap" {{#if appPath}}data-apppath='{{{appPath}}}'{{/if}} {{#if miniPath}}data-miniPath='{{{miniPath}}}'{{/if}} {{#if @root.wap.wechat.backDownload}}data-backDownload='{{@root.wap.wechat.backDownload}}'{{/if}}>
... ... @@ -130,8 +128,5 @@
{{#unless devEnv}}
{{> analysis}}
{{/unless}}
{{# showAnaJson}}
{{#if addBaiduSite}}<script src="//msite.baidu.com/sdk/c.js?appid=1583402501013173"></script>{{/if}}
{{/showAnaJson}}
</body>
</html>
... ...