Authored by 陈峰

Merge branch 'release/3.0' into 'master'

Release/3.0



See merge request !26
... ... @@ -243,13 +243,18 @@ exports.getSknUrl = (skn, originArr) => {
}, {
code: 200
}).then(data => {
let urls = data.data.product_list.map((item)=>`/product/pro_${item.product_id}_${item.goods_list[0].goods_id}/${item.cn_alphabet}.html`);//eslint-disable-line
let urls = data.data.product_list.map((item)=> {
return {
skn: item.product_skn,
url: `/product/pro_${item.product_id}_${item.goods_list[0].goods_id}/${item.cn_alphabet}.html`
};
});//eslint-disable-line
/*eslint-disable*/
for (let i in originArr.data.product_list) {
originArr.data.product_list[i].goodsUrl = urls[i];
}
/*eslint-enable*/
_.each(originArr.data.product_list, product => {
let urlItem = _.find(urls, url => url.skn === product.product_skn);
product.goodsUrl = _.get(urlItem, 'url', '');
});
return originArr;
});
};
... ...