Authored by 周少峰

piny

... ... @@ -378,17 +378,22 @@ _mvq.push(['$addItem', '', /*商品id*/ '{{cartEnsure.ids}}', '', '']);
_mvq.push(['$logData']);
</script>
<script type='text/javascript'>
py('event','viewCart' ,{
'money':'{money}',
'items':[
{{#cartEnsure.commonSell.productItem}}
{'id':'{{skn}}','count':'{{productNum}}','price':'{{productPrice}}'},
{{/cartEnsure.commonSell.productItem}}
{{#cartEnsure.preSell.productItem}}
{'id':'{{skn}}','count':'{{productNum}}','price':'{{productPrice}}'},
{{/cartEnsure.preSell.productItem}}
]
}).track('MC.Ok.7NFMIlCH_F_LE2riRlF2r_');
setTimeout(function() {
if (typeof (py) != 'undefined') {
py('event','viewCart' ,{
'money':'{{cartEnsure.productAmmount}}',
'items':[
{{#cartEnsure.commonSell.productItem}}
{'id':'{{skn}}','count':'{{productNum}}','price':'{{productPrice}}'},
{{/cartEnsure.commonSell.productItem}}
{{#cartEnsure.preSell.productItem}}
{'id':'{{skn}}','count':'{{productNum}}','price':'{{productPrice}}'},
{{/cartEnsure.preSell.productItem}}
]
}).track('MC.Ok.7NFMIlCH_F_LE2riRlF2r_');
}
}, 3000)
</script>
... ...
... ... @@ -33,15 +33,6 @@ var $addressManage = $('.address-manage'),
var cartType = $addressManage.attr('cart-type');
$loading.show();
var productNum = 0,productSkn=[],productSku=[],pinyouItems=[];
$('.product-num').each(function() {
productNum += parseInt($(this).html());
productSkn.push($(this).attr('data-skn'));
productSku.push($(this).attr('data-sku'));
pinyouItems.push({id: $(this).attr('data-skn'), count: parseInt($(this).html()), price: $(this).next('.cart-sub-total ').html()})
});
console.log(pinyouItems);
// 构建select下拉选项
function structureOption($obj, data, selectId) {
... ... @@ -880,11 +871,12 @@ $('.to-play input.submit').click(function() {
// 埋点
window.addPoint('YB_SC_TOPAY_CLICK', {ORDER_CODE: d.data.order_code, PRD_NUM: productNum, ORDER_AMOUNT: d.data.order_amount, PRO_SKN: productSkn.join(','), PRO_SKU:productSku.join(','), UNIONCOOKIE: encodeURIComponent(d.data.unionKey + '') || ''});
// 品友
py('event','order' ,{
'id': d.data.order_code, 'money': d.data.order_amount,
'items': pinyouItems
}).track('MC.2z.Rg-AQqSqQi2GykX12LUxI0');
if (typeof (py) != 'undefined') {
py('event','order' ,{
'id': d.data.order_code, 'money': d.data.order_amount,
'items': pinyouItems
}).track('MC.2z.Rg-AQqSqQi2GykX12LUxI0');
}
window.location.href = d.data.payUrl;
}
} else {
... ...