Authored by 邱骏

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

@@ -24,9 +24,13 @@ let _replaceData = function(el, cond, data, wh, fp) { @@ -24,9 +24,13 @@ let _replaceData = function(el, cond, data, wh, fp) {
24 if (!data) { 24 if (!data) {
25 return; 25 return;
26 } 26 }
  27 + 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]}"}}`;
27 28
  29 + if (data.collage_price && data.collage_activity_id) {
  30 + 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"}}`;
  31 + }
28 el.find('.brand-name').html(data.brand_name); 32 el.find('.brand-name').html(data.brand_name);
29 - 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]}"}}`); 33 + el.find('.product-detail').attr('href', product_url);
30 el.find('.product-name').html(data.product_name); 34 el.find('.product-name').html(data.product_name);
31 el.find('.vip-price-val').html(${data.vip_price}`); 35 el.find('.vip-price-val').html(${data.vip_price}`);
32 el.find('.sale-price').html(${data.sales_price}`); 36 el.find('.sale-price').html(${data.sales_price}`);