Authored by 郭成尧

jump-to-shop

... ... @@ -22,7 +22,7 @@ const _getProductBySkns = function(productObj) {
};
if (val.shop_id) {
obj.brandurl = `//m.yohobuy.com/product/shop?domain=${val.brand_domain}&openby:yohobuy={"action":"go.shop","params":{"shop_id":${val.shop_id},"shop_template_type":${val.shop_template_type}}}`; // eslint-disable-line
obj.brandurl = `//m.yohobuy.com/product/shop?domain=${val.brand_domain}&openby:yohobuy={"action":"go.shop","params":{"shop_id":${val.shop_id},"shop_template_type":${val.shop_template_type || "1"},"is_red_shop":${shop.is_red_shop || 1}}}`; // eslint-disable-line
} else {
obj.brandurl = `//m.yohobuy.com/product/shop?domain=${val.brand_domain}&openby:yohobuy={"action":"go.brand","params":{"brand_id":${val.brand_id}}}`; // eslint-disable-line
}
... ... @@ -45,7 +45,7 @@ const _getShopGroup = (shopRawData) => {
let renderData = _.get(result, 'data', []);
_.forEach(renderData, shop => {
shop.href = `//m.yohobuy.com/product/shop?domain=${shop.shop_domain}&openby:yohobuy={"action":"go.shop","params":{"shop_id":${shop.shops_id},"shop_template_type":${shop.shop_template_type},"is_red_shop":${shop.is_red_shop}}}`; // eslint-disable-line
shop.href = `//m.yohobuy.com/product/shop?domain=${shop.shop_domain}&openby:yohobuy={"action":"go.shop","params":{"shop_id":${shop.shops_id},"shop_template_type":${shop.shop_template_type || "1"},"is_red_shop":${shop.is_red_shop || 1}}}`; // eslint-disable-line
});
shopRawData.renderData = renderData;
... ...
... ... @@ -903,7 +903,7 @@ var _replaceData = function _replaceData(el, cond, data, wh, fp) {
var brandDom = el.find('.product-brand');
if (brandDom) {
if (data.shop_id) {
brandDom.attr('href', '//m.yohobuy.com/product/index/brand?domain=' + data.brand_domain + '&openby:yohobuy={"action":"go.shop","params":{"shop_id":' + data.shop_id + ',"shop_template_type":' + data.shop_template_type + ',"is_red_shop":' + data.is_red_shop + '}');
brandDom.attr('href', '//m.yohobuy.com/product/index/brand?domain=' + data.brand_domain + '&openby:yohobuy={"action":"go.shop","params":{"shop_id":' + data.shop_id + ',"shop_template_type":' + (data.shop_template_type || "1") + ',"is_red_shop":' + (data.is_red_shop || 1) + '}}');
} else {
brandDom.attr('href', '//m.yohobuy.com/product/index/brand?domain=' + data.brand_domain + '&openby:yohobuy={"action":"go.brand","params":{"brand_id":' + data.brand_id + '}}');
}
... ...