清空地址后退回结算界面,发现还保留了最后的地址 fix
Showing
1 changed file
with
11 additions
and
0 deletions
@@ -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 | }); |
-
Please register or login to post a comment