Showing
4 changed files
with
42 additions
and
27 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"> |
@@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
45 | 45 | ||
46 | {{!-- 修改地址 --}} | 46 | {{!-- 修改地址 --}} |
47 | {{#if modifyAddress.modifyAddress}} | 47 | {{#if modifyAddress.modifyAddress}} |
48 | - <a class="btn" href="{{modifyAddress.modifyAddressUrl}}"> | 48 | + <a class="btn btn-add-change" href="{{modifyAddress.modifyAddressUrl}}"> |
49 | <span>修改地址</span> | 49 | <span>修改地址</span> |
50 | </a> | 50 | </a> |
51 | {{/if}} | 51 | {{/if}} |
@@ -255,15 +255,6 @@ orderHammer.on('tap', function(e) { | @@ -255,15 +255,6 @@ 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 | - dialog.showDialog({ | ||
259 | - dialogText: '申请退款后,本单享有的优惠可能会一并取消,确定申请吗?', | ||
260 | - hasFooter: { | ||
261 | - leftBtnText: '返回', | ||
262 | - rightBtnText: '确定' | ||
263 | - } | ||
264 | - }, function() { | ||
265 | - dialog.hideDialog(); | ||
266 | - $refundReaMask.css('visibility', 'visible'); | ||
267 | 258 | ||
268 | // 埋点 | 259 | // 埋点 |
269 | if (window._yas && window._yas.sendCustomInfo) { | 260 | if (window._yas && window._yas.sendCustomInfo) { |
@@ -275,6 +266,16 @@ orderHammer.on('tap', function(e) { | @@ -275,6 +266,16 @@ orderHammer.on('tap', function(e) { | ||
275 | }) | 266 | }) |
276 | }, true); | 267 | }, true); |
277 | } | 268 | } |
269 | + | ||
270 | + dialog.showDialog({ | ||
271 | + dialogText: '申请退款后,本单享有的优惠可能会一并取消,确定申请吗?', | ||
272 | + hasFooter: { | ||
273 | + leftBtnText: '返回', | ||
274 | + rightBtnText: '确定' | ||
275 | + } | ||
276 | + }, function() { | ||
277 | + dialog.hideDialog(); | ||
278 | + $refundReaMask.css('visibility', 'visible'); | ||
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,18 +360,22 @@ $sureRefund.on('click', function() { | @@ -361,18 +360,22 @@ $sureRefund.on('click', function() { | ||
361 | }, function() { | 360 | }, function() { |
362 | dialog.hideDialog(); | 361 | dialog.hideDialog(); |
363 | $refundReaMask.css('visibility', 'visible'); | 362 | $refundReaMask.css('visibility', 'visible'); |
363 | + }); | ||
364 | +}); | ||
364 | 365 | ||
365 | - // 埋点 | 366 | +/** |
367 | + * 修改地址埋点 | ||
368 | + */ | ||
369 | +$addChange.on('click', function() { | ||
366 | if (window._yas && window._yas.sendCustomInfo) { | 370 | if (window._yas && window._yas.sendCustomInfo) { |
367 | window._yas.sendCustomInfo({ | 371 | window._yas.sendCustomInfo({ |
368 | - op: 'YB_ORDER_REFUND_C', | 372 | + op: 'YB_ORDER_MODIFY_ADDRESS_C', |
369 | param: JSON.stringify({ | 373 | param: JSON.stringify({ |
370 | C_ID: window._ChannelVary[window.cookie('_Channel')], | 374 | C_ID: window._ChannelVary[window.cookie('_Channel')], |
371 | ORD_NUM: orderId | 375 | ORD_NUM: orderId |
372 | }) | 376 | }) |
373 | }, true); | 377 | }, true); |
374 | } | 378 | } |
375 | - }); | ||
376 | }); | 379 | }); |
377 | 380 | ||
378 | function formatDate(objD) { | 381 | function formatDate(objD) { |
-
Please register or login to post a comment