Authored by Zhang

弹框只出现一次

@@ -35,7 +35,8 @@ let $invoice = $('.invoice'), @@ -35,7 +35,8 @@ let $invoice = $('.invoice'),
35 isYohoCoinClick = $coinLi.data('yoho-coin-click') * 1, // 判断有货币是否可以单击 35 isYohoCoinClick = $coinLi.data('yoho-coin-click') * 1, // 判断有货币是否可以单击
36 addressTop = $('.address-wrap').outerHeight(), 36 addressTop = $('.address-wrap').outerHeight(),
37 $message = $('#msg'), 37 $message = $('#msg'),
38 - $noPrintPrice = $('.no-print-price'); 38 + $noPrintPrice = $('.no-print-price'),
  39 + delivery = 0;
39 40
40 require('common'); 41 require('common');
41 42
@@ -447,13 +448,15 @@ $subBlock.on('touchstart', 'li', function() { @@ -447,13 +448,15 @@ $subBlock.on('touchstart', 'li', function() {
447 }); 448 });
448 let self = $(this); 449 let self = $(this);
449 450
450 - if (self.find('i').data('payment-type') === 2) { 451 + if (self.find('i').data('payment-type') === 2 && delivery === 0) {
451 dialog.showDialog({ 452 dialog.showDialog({
452 dialogText: '货到付款订单是否支持刷卡以当地快递公司为准', 453 dialogText: '货到付款订单是否支持刷卡以当地快递公司为准',
453 hasFooter: { 454 hasFooter: {
454 centerBtnText: '我知道了' 455 centerBtnText: '我知道了'
455 } 456 }
456 }); 457 });
  458 +
  459 + delivery = 1;
457 } 460 }
458 461
459 setTimeout(function() { 462 setTimeout(function() {
@@ -34,7 +34,8 @@ let $invoice = $('.invoice'), @@ -34,7 +34,8 @@ let $invoice = $('.invoice'),
34 isYohoCoinClick = $coinLi.data('yoho-coin-click') * 1, // 判断有货币是否可以单击 34 isYohoCoinClick = $coinLi.data('yoho-coin-click') * 1, // 判断有货币是否可以单击
35 addressTop = $('.address-wrap').outerHeight(), 35 addressTop = $('.address-wrap').outerHeight(),
36 $message = $('#msg'), 36 $message = $('#msg'),
37 - $noPrintPrice = $('.no-print-price'); 37 + $noPrintPrice = $('.no-print-price'),
  38 + delivery = 0;
38 39
39 require('common'); 40 require('common');
40 41
@@ -425,13 +426,15 @@ $subBlock.on('touchstart', 'li', function() { @@ -425,13 +426,15 @@ $subBlock.on('touchstart', 'li', function() {
425 }); 426 });
426 let self = $(this); 427 let self = $(this);
427 428
428 - if (self.find('i').data('payment-type') === 2) { 429 + if (self.find('i').data('payment-type') === 2 && delivery === 0) {
429 dialog.showDialog({ 430 dialog.showDialog({
430 dialogText: '货到付款订单是否支持刷卡以当地快递公司为准', 431 dialogText: '货到付款订单是否支持刷卡以当地快递公司为准',
431 hasFooter: { 432 hasFooter: {
432 centerBtnText: '我知道了' 433 centerBtnText: '我知道了'
433 } 434 }
434 }); 435 });
  436 +
  437 + delivery = 1;
435 } 438 }
436 439
437 setTimeout(function() { 440 setTimeout(function() {