Authored by 毕凯

清空地址后退回结算界面,发现还保留了最后的地址 fix

@@ -7,9 +7,20 @@ @@ -7,9 +7,20 @@
7 var $ = require('jquery'), 7 var $ = require('jquery'),
8 orderInfo = require('./order-info').orderInfo; 8 orderInfo = require('./order-info').orderInfo;
9 9
  10 +var $confim = $('.confim-mask'),
  11 + deleteId;
  12 +
10 $('.address-item').on('touchend', function() { 13 $('.address-item').on('touchend', function() {
11 orderInfo('addressId', $(this).data('address-id')); 14 orderInfo('addressId', $(this).data('address-id'));
12 }).on('touchend', '.edit', function() { 15 }).on('touchend', '.edit', function() {
13 window.location.href = $(this).data('href'); 16 window.location.href = $(this).data('href');
14 return false; 17 return false;
  18 +}).on('touchend', '.del', function() {
  19 + deleteId = $(this).data('address-id');
  20 +});
  21 +
  22 +$confim.on('touchend', '.confim', function() {
  23 + if (orderInfo('addressId') === deleteId) {
  24 + orderInfo('addressId', null);
  25 + }
15 }); 26 });