Authored by 毕凯

修改地址优化

@@ -89,14 +89,13 @@ $addressForm.on('submit', function() { @@ -89,14 +89,13 @@ $addressForm.on('submit', function() {
89 if (res.code !== 200) { 89 if (res.code !== 200) {
90 tip.show(res.message || '网络出了点问题~'); 90 tip.show(res.message || '网络出了点问题~');
91 isSubmiting = false; 91 isSubmiting = false;
  92 + loading.hideLoadingMask();
92 } else { 93 } else {
93 window.location.href = '/home/address'; 94 window.location.href = '/home/address';
94 } 95 }
95 }).fail(function() { 96 }).fail(function() {
96 tip.show('网络出了点问题~'); 97 tip.show('网络出了点问题~');
97 isSubmiting = false; 98 isSubmiting = false;
98 - }).always(function() {  
99 - loading.hideLoadingMask();  
100 }); 99 });
101 return false; 100 return false;
102 }); 101 });
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div class="my-address-page yoho-page"> 2 <div class="my-address-page yoho-page">
3 <div class="my-edit-address-page page-wrap"> 3 <div class="my-edit-address-page page-wrap">
4 <form class="edit-address"> 4 <form class="edit-address">
5 - <input type="hidden" name="id" value="{{address.id}}"> 5 + <input type="hidden" name="id" value="{{address.address_id}}">
6 <label class="username"> 6 <label class="username">
7 收件人姓名 7 收件人姓名
8 <input type="text" name="consignee" maxlength="20" value="{{address.consignee}}"> 8 <input type="text" name="consignee" maxlength="20" value="{{address.consignee}}">
1 -<div class="my-edit-address-page page-wrap hide">  
2 - {{# address}}  
3 - <form class="edit-address">  
4 - <input type="hidden" name="id" value="">  
5 - <label class="username">  
6 - 收件人姓名  
7 - <input type="text" name="consignee" maxlength="20" value="{{consignee}}">  
8 - </label>  
9 - <label class="mobile">  
10 - 手机号码  
11 - <input type="text" name="mobile" value="{{mobile}}">  
12 - </label>  
13 - <label class="area">  
14 - 省市区  
15 - <input type="hidden" name="area_code" value="{{area_code}}">  
16 - <input type="text" name="area" value="{{area}}" readonly>  
17 - <span class="iconfont">&#xe604;</span>  
18 - </label>  
19 - <label class="address">  
20 - 详细地址  
21 - <textarea name="address" maxlength="100">{{address}}</textarea>  
22 - </label>  
23 -  
24 - </form>  
25 - {{/ address}}  
26 -  
27 - <div class="submit">  
28 - 确认  
29 - </div>  
30 -</div>