Authored by 邱骏

商品中如果是团购商品,则跳转团购商品页面

... ... @@ -24,9 +24,13 @@ let _replaceData = function(el, cond, data, wh, fp) {
if (!data) {
return;
}
let product_url = `//m.yohobuy.com/product/${data.product_skn}.html?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":${data.product_skn},"from_page_name":"${getPname()}","from_page_param":"${location.href.split('?')[0]}"}}`;
if (data.collage_price && data.collage_activity_id) {
product_url = `//m.yohobuy.com/activity/group/detail?activityId=${data.collage_activity_id}&productSkn=${data.product_skn}&openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${data.product_skn}","activity_id":"${data.collage_activity_id}","activity_type":"groupPurchase"}}`;
}
el.find('.brand-name').html(data.brand_name);
el.find('.product-detail').attr('href', `//m.yohobuy.com/product/${data.product_skn}.html?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":${data.product_skn},"from_page_name":"${getPname()}","from_page_param":"${location.href.split('?')[0]}"}}`);
el.find('.product-detail').attr('href', product_url);
el.find('.product-name').html(data.product_name);
el.find('.vip-price-val').html(${data.vip_price}`);
el.find('.sale-price').html(${data.sales_price}`);
... ...