Authored by 周少峰

cart ensure

... ... @@ -272,7 +272,7 @@
{{/isVipPrice}}
</td>
<td>{{yohoIcon}}个</td>
<td>{{productNum}}</td>
<td class="product-num">{{productNum}}</td>
<td class="cart-sub-total {{#xForOne}}xforone{{/xForOne}}">
{{#if xForOne}}
<del>{{productSubtotal}}</del>
... ...
... ... @@ -918,7 +918,6 @@ $('.btn_account').on('click', function() {
// 结算点击埋点
window.addPoint('YB_SC_TOBUY_CLICK', {PRD_ID: productId});
return false;
if ($('.pre-sell-box input:checked').length > 0) {
... ...
... ... @@ -767,6 +767,7 @@ $('.to-play input.submit').click(function() {
invoiceContent,
receiverMobile,
invoiceTitle,
productNum = 0,
paymentType = $('.pay-time-modify input[name="pay-type"]:checked').val(),
paymentId = $('.pay-time-modify input[name="pay-type"]:checked').data('pay'),
remark = $('#notedesc').val(),
... ... @@ -791,7 +792,7 @@ $('.to-play input.submit').click(function() {
return;
}
$this.attr('disabled', 'disabled');
$this.attr('disabled', 'disabled');
$.ajax({
type: 'POST',
... ... @@ -818,8 +819,12 @@ $('.to-play input.submit').click(function() {
}).then(function(d) {
$loading.hide();
if (d.code === 200) {
// 去付款按钮埋点
$('.product-num').each(function() {
productNum += parseInt($(this).html());
});
window.addPoint('YB_SC_TOPAY_CLICK', {ORDER_CODE: d.data.order_code, PRD_NUM: productNum, ORDER_AMOUNT: d.data.order_amount});
window.location.href = d.data.payUrl;
} else {
new dialog.Alert(d.message).show();
... ...
... ... @@ -876,6 +876,9 @@ $invoiceCheck.click(function(){
}
if ($invoiceCheck.attr('checked')) {
// 选中时传输
window.addPoint('YB_SC_INVOICE_ISSUE');
$invoiceCheck.addClass('active');
if ($('.invoice-content-outter').hasClass('hide')) {
$receiptInfo.removeClass('hide');
... ... @@ -952,6 +955,9 @@ function saveReceiptInfo() {
$receiptInfo.addClass('hide');
$('.invoice-content-outter').removeClass('hide');
// 保存按钮埋点
window.addPoint('YB_SC_INVOICE_INFO_SAVE', {INVOICE_TYPE: invoiceTypeInt, INVOICE_TITLE: $('input[name="title"]:checked').val(), INVOICE_CONTENT: receiptContent});
}
function rejustReceiptInfo() {
... ... @@ -1049,3 +1055,6 @@ $('#input-mobile').bind('input propertychange', function() {
$('.invoice-phone .enpty-input').addClass('hide');
}
});
// 订单确认页默认埋点
window.addPoint('YB_SC_ORDER_ENSURE');
... ...
... ... @@ -17,8 +17,9 @@ var $ = require('yoho.jquery'),
activeTab,
imgAlt,
imgSrc,
orderCode,
payment;
payment,
orderCode = $('.order-num').text(),
orderCount = $('.order-num').siblings('strong').text();
$.jqtab = function(tabtit, tabcon) {
... ... @@ -91,6 +92,10 @@ $('#btnby').click(function() {
payment = $('.choose-type').attr('data-id');
orderCode = $('.order-num').text();
getData(payment, orderCode);
// 埋点
window.addPoint('YB_SC_PAYMENT_TOPAY_CLICK', {ORDER_CODE: orderCode, ORDER_AMOUNT: orderCount, PAY_STYLE: payment});
window.open($payUrl + '?order_code=' + orderCode + '&payment_type=' + $showValue);
$lightBox.show();
});
... ... @@ -108,4 +113,7 @@ $('.pay-over').unbind('click').bind('click', function() {
window.location.href = $(_this).data('url');
}
);
});
\ No newline at end of file
});
// 默认埋点
window.addPoint('YB_SC_PAYMENT', {ORDER_CODE: orderCode, ORDER_AMOUNT: orderCount});
\ No newline at end of file
... ...