Authored by 郭成尧

point-change

... ... @@ -128,7 +128,7 @@
{{/if}}
{{!-- 修改地址 --}}
{{#if addressModify}}
<a href="{{newUrl}}" class="btn">修改地址</a>
<a href="{{newUrl}}" class="btn btn-add-change">修改地址</a>
{{/if}}
{{#if isDepositAdvance}}
<div class="order-opt">
... ...
... ... @@ -44,7 +44,7 @@
{{/if}}
{{!-- 修改地址 --}}
{{#if modifyAddress.modifyAddress}}
<a class="btn" href="{{modifyAddress.modifyAddressUrl}}">
<a class="btn btn-add-change" href="{{modifyAddress.modifyAddressUrl}}">
<span>修改地址</span>
</a>
{{/if}}
... ...
... ... @@ -255,6 +255,18 @@ orderHammer.on('tap', function(e) {
});
} else if ($cur.closest('.refund').length > 0) {
// 申请退款
// 埋点
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_ORDER_REFUND_C',
param: JSON.stringify({
C_ID: window._ChannelVary[window.cookie('_Channel')],
ORD_NUM: id
})
}, true);
}
dialog.showDialog({
dialogText: '申请退款后,本单享有的优惠可能会一并取消,确定申请吗?',
hasFooter: {
... ... @@ -264,17 +276,6 @@ orderHammer.on('tap', function(e) {
}, function() {
dialog.hideDialog();
$refundReaMask.css('visibility', 'visible');
// 埋点
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_ORDER_REFUND_C',
param: JSON.stringify({
C_ID: window._ChannelVary[window.cookie('_Channel')],
ORD_NUM: id
})
}, true);
}
});
} else if ($cur.closest('.order-goods').length > 0) {
... ... @@ -296,6 +297,17 @@ orderHammer.on('tap', function(e) {
tip.show(res.message);
}
});
} else if ($cur.closest('.btn-add-change').length > 0) {
// 修改地址埋点
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_ORDER_MODIFY_ADDRESS_C',
param: JSON.stringify({
C_ID: window._ChannelVary[window.cookie('_Channel')],
ORD_NUM: id
})
}, true);
}
}
});
... ...
... ... @@ -24,6 +24,7 @@ var orderId = $('#order-detail').data('id'),
var $sureClose = $('.btn-cancel'); // 取消订单按钮
var $sureRefund = $('.btn-refund'); // 申请退款按钮
var $addChange = $('.btn-add-change'); // 修改地址
require('home/order-detail-index.page.css');
... ... @@ -147,19 +148,6 @@ optHammer.on('tap', function(e) {
if ($ownerInfo.data('changeable') === true) {
$ownerInfo.find('.rest').show();
$ownerInfo.on('touchend', function() {
/**
* 埋点
*/
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_ORDER_MODIFY_ADDRESS_C',
param: JSON.stringify({
C_ID: window._ChannelVary[window.cookie('_Channel')],
ORD_NUM: orderId
})
}, true);
}
location.href = $ownerInfo.data('url');
});
}
... ... @@ -352,6 +340,17 @@ $sureClose.on('click', function() {
// 弹出申请退款提示框
$sureRefund.on('click', function() {
// 埋点
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_ORDER_REFUND_C',
param: JSON.stringify({
C_ID: window._ChannelVary[window.cookie('_Channel')],
ORD_NUM: orderId
})
}, true);
}
dialog.showDialog({
dialogText: '申请退款后,本单享有的优惠可能会一并取消,确定申请吗?',
hasFooter: {
... ... @@ -361,20 +360,24 @@ $sureRefund.on('click', function() {
}, function() {
dialog.hideDialog();
$refundReaMask.css('visibility', 'visible');
// 埋点
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_ORDER_REFUND_C',
param: JSON.stringify({
C_ID: window._ChannelVary[window.cookie('_Channel')],
ORD_NUM: orderId
})
}, true);
}
});
});
/**
* 修改地址埋点
*/
$addChange.on('click', function() {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_ORDER_MODIFY_ADDRESS_C',
param: JSON.stringify({
C_ID: window._ChannelVary[window.cookie('_Channel')],
ORD_NUM: orderId
})
}, true);
}
});
function formatDate(objD) {
var str,
yy = objD.getYear(),
... ...