Authored by ccbikai

最多添加五个测试地址

@@ -19,6 +19,7 @@ var $action = $('.action'), @@ -19,6 +19,7 @@ var $action = $('.action'),
19 $confim = $('.confim-mask'), 19 $confim = $('.confim-mask'),
20 $pageWrap = $('.page-wrap'), 20 $pageWrap = $('.page-wrap'),
21 $backBtn = $('.nav-back'), 21 $backBtn = $('.nav-back'),
  22 + $addressItem = $('.address-item'),
22 $navTitle = $('.nav-title'), 23 $navTitle = $('.nav-title'),
23 isSubmiting, 24 isSubmiting,
24 deleteId, 25 deleteId,
@@ -95,6 +96,10 @@ $confim.on('touchend', '.cancel', function() { @@ -95,6 +96,10 @@ $confim.on('touchend', '.cancel', function() {
95 96
96 // 添加地址 97 // 添加地址
97 $addAddress.on('touchend', function() { 98 $addAddress.on('touchend', function() {
  99 + if ($addressItem.length >= 5) {
  100 + tip.show('您最多添加5个收货地址');
  101 + return false;
  102 + }
98 editAddress(); 103 editAddress();
99 $navTitle.html('添加新地址'); 104 $navTitle.html('添加新地址');
100 }); 105 });
@@ -59,26 +59,26 @@ @@ -59,26 +59,26 @@
59 <a class="list-item" href="/home/address"> 59 <a class="list-item" href="/home/address">
60 <span class="iconfont icon">&#xe637;</span> 60 <span class="iconfont icon">&#xe637;</span>
61 地址管理 61 地址管理
62 - <span class="iconfont num">{{#if address_num}}{{address_num}}{{/if}} &#xe604;</span> 62 + <span class="iconfont num">{{address_num}} &#xe604;</span>
63 </a> 63 </a>
64 </div> 64 </div>
65 <div class="group-list"> 65 <div class="group-list">
66 <a class="list-item" href="/home/coupons"> 66 <a class="list-item" href="/home/coupons">
67 <span class="iconfont icon">&#xe63a;</span> 67 <span class="iconfont icon">&#xe63a;</span>
68 优惠券 68 优惠券
69 - <span class="iconfont num">{{#if coupon_num}}{{coupon_num}}{{/if}} &#xe604;</span> 69 + <span class="iconfont num">{{coupon_num}} &#xe604;</span>
70 </a> 70 </a>
71 <a class="list-item" href="/home/currency"> 71 <a class="list-item" href="/home/currency">
72 <span class="iconfont icon">&#xe635;</span> 72 <span class="iconfont icon">&#xe635;</span>
73 YOHO 73 YOHO
74 - <span class="iconfont num">{{#if yoho_coin_num}}{{yoho_coin_num}}{{/if}} &#xe604;</span> 74 + <span class="iconfont num">{{yoho_coin_num}} &#xe604;</span>
75 </a> 75 </a>
76 </div> 76 </div>
77 <div class="group-list"> 77 <div class="group-list">
78 <a class="list-item" href="/home/message"> 78 <a class="list-item" href="/home/message">
79 <span class="iconfont icon">&#xe636;</span> 79 <span class="iconfont icon">&#xe636;</span>
80 消息 80 消息
81 - <span class="iconfont num">{{#if inbox_total}}{{inbox_total}}{{/if}} &#xe604;</span> 81 + <span class="iconfont num">{{inbox_total}} &#xe604;</span>
82 </a> 82 </a>
83 </div> 83 </div>
84 <div class="group-list"> 84 <div class="group-list">