Authored by htoooth

fix trace

@@ -23,6 +23,8 @@ var $addressManage, $province, $city, @@ -23,6 +23,8 @@ var $addressManage, $province, $city,
23 var isProvinceChecked = false; 23 var isProvinceChecked = false;
24 var refundDialogTpl = require('hbs/home/orders/refund-dialog.hbs'); 24 var refundDialogTpl = require('hbs/home/orders/refund-dialog.hbs');
25 25
  26 +var yas = require('../../common/data-yas');
  27 +
26 function cancelFactory(id) { 28 function cancelFactory(id) {
27 var options = { 29 var options = {
28 mask: false, 30 mask: false,
@@ -648,10 +650,13 @@ $('.me-orders, .order-detail').on('click', '.cancel-order', function() { @@ -648,10 +650,13 @@ $('.me-orders, .order-detail').on('click', '.cancel-order', function() {
648 active = deleteOrder(id, this); 650 active = deleteOrder(id, this);
649 active.show(); 651 active.show();
650 }).on('click', '.edit-order', function() { 652 }).on('click', '.edit-order', function() {
  653 + var orderId = $(this).closest('.order, .order-detail').data('id');
  654 +
651 $(this).addClass('edit-order-active'); 655 $(this).addClass('edit-order-active');
652 - active = editOrder($(this).closest('.order, .order-detail').data('id')); 656 + active = editOrder(orderId);
653 active.show(); 657 active.show();
654 newAddress(0); 658 newAddress(0);
  659 + traceChangeAddress(orderId); // eslint-diable-line
655 }).on('click', '.rebuy', function() { 660 }).on('click', '.rebuy', function() {
656 var id = $(this).closest('.order, .order-detail').data('id'); 661 var id = $(this).closest('.order, .order-detail').data('id');
657 662
@@ -681,5 +686,20 @@ $('.check-logistics').click(function() { @@ -681,5 +686,20 @@ $('.check-logistics').click(function() {
681 }); 686 });
682 687
683 $('.refund-apply').on('click', function() { 688 $('.refund-apply').on('click', function() {
684 - showRefundDialog($(this).closest('.order, .order-detail').data('id')); 689 + var orderId = $(this).closest('.order, .order-detail').data('id');
  690 +
  691 + showRefundDialog(orderId);
  692 + traceRefund(orderId); // eslint-disable-line
685 }); 693 });
  694 +
  695 +function traceRefund(orderId) {
  696 + yas.givePoint('YB_ORDER_REFUND_C', {
  697 + ORD_NUM: orderId
  698 + });
  699 +}
  700 +
  701 +function traceChangeAddress(orderId) {
  702 + yas.givePoint('YB_ORDER_MODIFY_ADDRESS_C', {
  703 + ORD_NUM: orderId
  704 + });
  705 +}