Authored by 陈峰

yas

... ... @@ -39,7 +39,7 @@ const detail = (params, isApp) => {
return {
bundleDatas: _.map(result.data, (bundle, index) => {
let query = {skn: params.skn, index: index + 1};
let query = {skn: params.skn, productId: params.productId, index: index + 1};
if (isApp) {
query.app_version = isApp;
... ...
... ... @@ -223,13 +223,13 @@ const tool = {
* @param skn
* @returns {{}}
*/
processBundle(bundleData, skn, gid, index) {
processBundle(bundleData, skn, productId, index) {
let subPrice = _.get(bundleData, 'bundleInfo.subPrice', 0);
return {
tabName: _.get(bundleData, 'bundleInfo.tabName') || '',
title: _.get(bundleData, 'bundleInfo.bundleName') || '优惠套装',
href: helpers.urlFormat('/product/bundle/detail', {skn: skn, gid: gid, index: index}),
href: helpers.urlFormat('/product/bundle/detail', {skn: skn, productId: productId, index: index}),
description: subPrice ? '立省¥' + subPrice : 0,
productList: productProcess.processProductList(bundleData && bundleData.productList)
};
... ... @@ -297,7 +297,6 @@ const newDetail = {
let brandId = params.brandId;
let productId = params.productId;
let skn = params.skn;
let gid = params.gid;
let apiArray = [
this.queryShopsByBrandId(brandId), // 0 品牌信息
... ... @@ -338,7 +337,7 @@ const newDetail = {
tool.processDiscount(finalResult, _.find(bundleDatas, data => data.discountType === 2));
} else { /* 套装 */
finalResult.bundleDatas = _.map(bundleDatas, (data, index) => {
return tool.processBundle(data, skn, gid, ++index);
return tool.processBundle(data, skn, productId, ++index);
});
}
... ...
... ... @@ -321,6 +321,16 @@ function submitOrder() {
ORDER_AMOUNT: res.data.order_amount
})
}, true);
if (queryString.cartType === 'bundle' || queryString.carttype === 'bundle') {
window._yas.sendCustomInfo({
op: 'YB_GDS_PACKAGE_ORD_L',
param: JSON.stringify({
C_ID: window._ChannelVary[cookie.get('_Channel')],
PRD_ID: queryString.productId,
ORD_NUM: res.data.order_code + ''
})
}, true);
}
}
/* tar add 190222 */
... ... @@ -562,3 +572,4 @@ $(window).scroll(function() {
$('.address-bottom').hide();
}
});
... ...
... ... @@ -70,7 +70,8 @@ $('.goods-img').on('touchend', function() {
op: 'YB_GDS_PACKAGE_GOODS_C',
param: JSON.stringify({
C_ID: window._ChannelVary[window.cookie('_Channel')],
PRD_ID: window.queryString.gid,
PRD_ID: window.queryString.productId,
TAB_ID: window.queryString.index || 1,
PACKAGE_GOODS: packGood.data('id'),
PACKAGE_INDEX: packGood.data('index') + 1
})
... ... @@ -85,6 +86,16 @@ $('.bundle-tabs').on('click', '.swiper-slide', (e) => {
if ($tab.hasClass('selected')) {
return;
}
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_GDS_PACKAGE_TAB_C',
param: JSON.stringify({
C_ID: window._ChannelVary[window.cookie('_Channel')],
PRD_ID: window.queryString.productId,
TAB_ID: $(e.currentTarget).data('index') + 1
})
}, true);
}
let href = $tab.data('href');
window.location.href = href;
... ... @@ -128,7 +139,7 @@ $buyNowBtn.on('touchstart', function() {
op: 'YB_GDS_PACKAGE_BUY_NOW_C',
param: JSON.stringify({
C_ID: window._ChannelVary[window.cookie('_Channel')],
PRD_ID: window.queryString.id,
PRD_ID: window.queryString.productId,
PACKAGE_GOODS: yasGid.join(',')
})
}, true);
... ... @@ -141,6 +152,6 @@ $buyNowBtn.on('touchstart', function() {
activity_id: bundleId
}), actCkOpthn);
window.location.href = '/cart/index/new/orderEnsure?cartType=bundle&activityType=bundle';
window.location.href = '/cart/index/new/orderEnsure?cartType=bundle&activityType=bundle&productId=' + window.queryString.productId;
}
});
... ...
... ... @@ -55,6 +55,16 @@ let bundleObj = {
$(e.currentTarget).addClass('selected').siblings().removeClass('selected');
self.bundleIndex = index;
self.renderProduct();
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_GDS_PACKAGE_TAB_C',
param: JSON.stringify({
C_ID: window._ChannelVary[window.cookie('_Channel')],
PRD_ID: $('#productId').val(),
TAB_ID: index + 1
})
}, true);
}
}
});
},
... ...