...
|
...
|
@@ -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,9 +85,10 @@ const newDetail = { |
|
|
appPath: appPath,
|
|
|
isMarsApp: req.yoho.isMarsApp, // 判断mars
|
|
|
showAnaJson: {
|
|
|
mipsite: true,
|
|
|
miptitle: title,
|
|
|
mipPublishTime: moment.unix(result.shelveTime).format('YYYY-MM-DDTHH:mm:ss'), // mip日期必填
|
|
|
mipPics: mipPics.slice(0, 5),
|
|
|
mipPic: mipPic,
|
|
|
mipDes: description,
|
|
|
mipUrl: `${req.protocol}://m.yohobuy.com/product/${result.productSkn}.html`
|
|
|
},
|
...
|
...
|
|