...
|
...
|
@@ -58,16 +58,12 @@ const newDetail = { |
|
|
let appPath = 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.productDetail","params":' +
|
|
|
JSON.stringify(appParams) +
|
|
|
'}';
|
|
|
let mipPics = _.map(_.get(result, 'bannerTop.list', []), item => {
|
|
|
return item.img.replace(/\?(.*)/g, '?imageView2/{mode}/w/{width}/h/{height}');
|
|
|
});
|
|
|
let mipPic = _.get(result, 'bannerTop.list[0].img', '');
|
|
|
|
|
|
if (mipPics.length <= 0) {
|
|
|
mipPics.push(_.get(result, 'bannerTop.img', '').replace(
|
|
|
/\?(.*)/g,
|
|
|
'?imageView2/{mode}/w/{width}/h/{height}'
|
|
|
));
|
|
|
}
|
|
|
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 + '元,购买' +
|
...
|
...
|
@@ -89,11 +85,12 @@ const newDetail = { |
|
|
appPath: appPath,
|
|
|
isMarsApp: req.yoho.isMarsApp, // 判断mars
|
|
|
showAnaJson: {
|
|
|
miptitle: title,
|
|
|
mipPublishTime: moment.unix(result.shelveTime).format('YYYY-MM-DDTHH:mm:ss'), // mip日期必填
|
|
|
mipPics: mipPics.slice(0, 5),
|
|
|
mipDes: description,
|
|
|
mipUrl: `${req.protocol}://m.yohobuy.com/product/${result.productSkn}.html`
|
|
|
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,
|
...
|
...
|
|