Showing
4 changed files
with
52 additions
and
37 deletions
@@ -128,7 +128,7 @@ | @@ -128,7 +128,7 @@ | ||
128 | {{/if}} | 128 | {{/if}} |
129 | {{!-- 修改地址 --}} | 129 | {{!-- 修改地址 --}} |
130 | {{#if addressModify}} | 130 | {{#if addressModify}} |
131 | - <a href="{{newUrl}}" class="btn">修改地址</a> | 131 | + <a href="{{newUrl}}" class="btn btn-add-change">修改地址</a> |
132 | {{/if}} | 132 | {{/if}} |
133 | {{#if isDepositAdvance}} | 133 | {{#if isDepositAdvance}} |
134 | <div class="order-opt"> | 134 | <div class="order-opt"> |
@@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
44 | {{/if}} | 44 | {{/if}} |
45 | {{!-- 修改地址 --}} | 45 | {{!-- 修改地址 --}} |
46 | {{#if modifyAddress.modifyAddress}} | 46 | {{#if modifyAddress.modifyAddress}} |
47 | - <a class="btn" href="{{modifyAddress.modifyAddressUrl}}"> | 47 | + <a class="btn btn-add-change" href="{{modifyAddress.modifyAddressUrl}}"> |
48 | <span>修改地址</span> | 48 | <span>修改地址</span> |
49 | </a> | 49 | </a> |
50 | {{/if}} | 50 | {{/if}} |
@@ -255,6 +255,18 @@ orderHammer.on('tap', function(e) { | @@ -255,6 +255,18 @@ orderHammer.on('tap', function(e) { | ||
255 | }); | 255 | }); |
256 | } else if ($cur.closest('.refund').length > 0) { | 256 | } else if ($cur.closest('.refund').length > 0) { |
257 | // 申请退款 | 257 | // 申请退款 |
258 | + | ||
259 | + // 埋点 | ||
260 | + if (window._yas && window._yas.sendCustomInfo) { | ||
261 | + window._yas.sendCustomInfo({ | ||
262 | + op: 'YB_ORDER_REFUND_C', | ||
263 | + param: JSON.stringify({ | ||
264 | + C_ID: window._ChannelVary[window.cookie('_Channel')], | ||
265 | + ORD_NUM: id | ||
266 | + }) | ||
267 | + }, true); | ||
268 | + } | ||
269 | + | ||
258 | dialog.showDialog({ | 270 | dialog.showDialog({ |
259 | dialogText: '申请退款后,本单享有的优惠可能会一并取消,确定申请吗?', | 271 | dialogText: '申请退款后,本单享有的优惠可能会一并取消,确定申请吗?', |
260 | hasFooter: { | 272 | hasFooter: { |
@@ -264,17 +276,6 @@ orderHammer.on('tap', function(e) { | @@ -264,17 +276,6 @@ orderHammer.on('tap', function(e) { | ||
264 | }, function() { | 276 | }, function() { |
265 | dialog.hideDialog(); | 277 | dialog.hideDialog(); |
266 | $refundReaMask.css('visibility', 'visible'); | 278 | $refundReaMask.css('visibility', 'visible'); |
267 | - | ||
268 | - // 埋点 | ||
269 | - if (window._yas && window._yas.sendCustomInfo) { | ||
270 | - window._yas.sendCustomInfo({ | ||
271 | - op: 'YB_ORDER_REFUND_C', | ||
272 | - param: JSON.stringify({ | ||
273 | - C_ID: window._ChannelVary[window.cookie('_Channel')], | ||
274 | - ORD_NUM: id | ||
275 | - }) | ||
276 | - }, true); | ||
277 | - } | ||
278 | }); | 279 | }); |
279 | } else if ($cur.closest('.order-goods').length > 0) { | 280 | } else if ($cur.closest('.order-goods').length > 0) { |
280 | 281 | ||
@@ -296,6 +297,17 @@ orderHammer.on('tap', function(e) { | @@ -296,6 +297,17 @@ orderHammer.on('tap', function(e) { | ||
296 | tip.show(res.message); | 297 | tip.show(res.message); |
297 | } | 298 | } |
298 | }); | 299 | }); |
300 | + } else if ($cur.closest('.btn-add-change').length > 0) { | ||
301 | + // 修改地址埋点 | ||
302 | + if (window._yas && window._yas.sendCustomInfo) { | ||
303 | + window._yas.sendCustomInfo({ | ||
304 | + op: 'YB_ORDER_MODIFY_ADDRESS_C', | ||
305 | + param: JSON.stringify({ | ||
306 | + C_ID: window._ChannelVary[window.cookie('_Channel')], | ||
307 | + ORD_NUM: id | ||
308 | + }) | ||
309 | + }, true); | ||
310 | + } | ||
299 | } | 311 | } |
300 | }); | 312 | }); |
301 | 313 |
@@ -24,6 +24,7 @@ var orderId = $('#order-detail').data('id'), | @@ -24,6 +24,7 @@ var orderId = $('#order-detail').data('id'), | ||
24 | 24 | ||
25 | var $sureClose = $('.btn-cancel'); // 取消订单按钮 | 25 | var $sureClose = $('.btn-cancel'); // 取消订单按钮 |
26 | var $sureRefund = $('.btn-refund'); // 申请退款按钮 | 26 | var $sureRefund = $('.btn-refund'); // 申请退款按钮 |
27 | +var $addChange = $('.btn-add-change'); // 修改地址 | ||
27 | 28 | ||
28 | 29 | ||
29 | require('home/order-detail-index.page.css'); | 30 | require('home/order-detail-index.page.css'); |
@@ -147,19 +148,6 @@ optHammer.on('tap', function(e) { | @@ -147,19 +148,6 @@ optHammer.on('tap', function(e) { | ||
147 | if ($ownerInfo.data('changeable') === true) { | 148 | if ($ownerInfo.data('changeable') === true) { |
148 | $ownerInfo.find('.rest').show(); | 149 | $ownerInfo.find('.rest').show(); |
149 | $ownerInfo.on('touchend', function() { | 150 | $ownerInfo.on('touchend', function() { |
150 | - /** | ||
151 | - * 埋点 | ||
152 | - */ | ||
153 | - if (window._yas && window._yas.sendCustomInfo) { | ||
154 | - window._yas.sendCustomInfo({ | ||
155 | - op: 'YB_ORDER_MODIFY_ADDRESS_C', | ||
156 | - param: JSON.stringify({ | ||
157 | - C_ID: window._ChannelVary[window.cookie('_Channel')], | ||
158 | - ORD_NUM: orderId | ||
159 | - }) | ||
160 | - }, true); | ||
161 | - } | ||
162 | - | ||
163 | location.href = $ownerInfo.data('url'); | 151 | location.href = $ownerInfo.data('url'); |
164 | }); | 152 | }); |
165 | } | 153 | } |
@@ -352,6 +340,17 @@ $sureClose.on('click', function() { | @@ -352,6 +340,17 @@ $sureClose.on('click', function() { | ||
352 | 340 | ||
353 | // 弹出申请退款提示框 | 341 | // 弹出申请退款提示框 |
354 | $sureRefund.on('click', function() { | 342 | $sureRefund.on('click', function() { |
343 | + // 埋点 | ||
344 | + if (window._yas && window._yas.sendCustomInfo) { | ||
345 | + window._yas.sendCustomInfo({ | ||
346 | + op: 'YB_ORDER_REFUND_C', | ||
347 | + param: JSON.stringify({ | ||
348 | + C_ID: window._ChannelVary[window.cookie('_Channel')], | ||
349 | + ORD_NUM: orderId | ||
350 | + }) | ||
351 | + }, true); | ||
352 | + } | ||
353 | + | ||
355 | dialog.showDialog({ | 354 | dialog.showDialog({ |
356 | dialogText: '申请退款后,本单享有的优惠可能会一并取消,确定申请吗?', | 355 | dialogText: '申请退款后,本单享有的优惠可能会一并取消,确定申请吗?', |
357 | hasFooter: { | 356 | hasFooter: { |
@@ -361,20 +360,24 @@ $sureRefund.on('click', function() { | @@ -361,20 +360,24 @@ $sureRefund.on('click', function() { | ||
361 | }, function() { | 360 | }, function() { |
362 | dialog.hideDialog(); | 361 | dialog.hideDialog(); |
363 | $refundReaMask.css('visibility', 'visible'); | 362 | $refundReaMask.css('visibility', 'visible'); |
364 | - | ||
365 | - // 埋点 | ||
366 | - if (window._yas && window._yas.sendCustomInfo) { | ||
367 | - window._yas.sendCustomInfo({ | ||
368 | - op: 'YB_ORDER_REFUND_C', | ||
369 | - param: JSON.stringify({ | ||
370 | - C_ID: window._ChannelVary[window.cookie('_Channel')], | ||
371 | - ORD_NUM: orderId | ||
372 | - }) | ||
373 | - }, true); | ||
374 | - } | ||
375 | }); | 363 | }); |
376 | }); | 364 | }); |
377 | 365 | ||
366 | +/** | ||
367 | + * 修改地址埋点 | ||
368 | + */ | ||
369 | +$addChange.on('click', function() { | ||
370 | + if (window._yas && window._yas.sendCustomInfo) { | ||
371 | + window._yas.sendCustomInfo({ | ||
372 | + op: 'YB_ORDER_MODIFY_ADDRESS_C', | ||
373 | + param: JSON.stringify({ | ||
374 | + C_ID: window._ChannelVary[window.cookie('_Channel')], | ||
375 | + ORD_NUM: orderId | ||
376 | + }) | ||
377 | + }, true); | ||
378 | + } | ||
379 | +}); | ||
380 | + | ||
378 | function formatDate(objD) { | 381 | function formatDate(objD) { |
379 | var str, | 382 | var str, |
380 | yy = objD.getYear(), | 383 | yy = objD.getYear(), |
-
Please register or login to post a comment