Authored by ccbikai

最多添加五个测试地址

... ... @@ -19,6 +19,7 @@ var $action = $('.action'),
$confim = $('.confim-mask'),
$pageWrap = $('.page-wrap'),
$backBtn = $('.nav-back'),
$addressItem = $('.address-item'),
$navTitle = $('.nav-title'),
isSubmiting,
deleteId,
... ... @@ -95,6 +96,10 @@ $confim.on('touchend', '.cancel', function() {
// 添加地址
$addAddress.on('touchend', function() {
if ($addressItem.length >= 5) {
tip.show('您最多添加5个收货地址');
return false;
}
editAddress();
$navTitle.html('添加新地址');
});
... ...
... ... @@ -59,26 +59,26 @@
<a class="list-item" href="/home/address">
<span class="iconfont icon">&#xe637;</span>
地址管理
<span class="iconfont num">{{#if address_num}}{{address_num}}{{/if}} &#xe604;</span>
<span class="iconfont num">{{address_num}} &#xe604;</span>
</a>
</div>
<div class="group-list">
<a class="list-item" href="/home/coupons">
<span class="iconfont icon">&#xe63a;</span>
优惠券
<span class="iconfont num">{{#if coupon_num}}{{coupon_num}}{{/if}} &#xe604;</span>
<span class="iconfont num">{{coupon_num}} &#xe604;</span>
</a>
<a class="list-item" href="/home/currency">
<span class="iconfont icon">&#xe635;</span>
YOHO
<span class="iconfont num">{{#if yoho_coin_num}}{{yoho_coin_num}}{{/if}} &#xe604;</span>
<span class="iconfont num">{{yoho_coin_num}} &#xe604;</span>
</a>
</div>
<div class="group-list">
<a class="list-item" href="/home/message">
<span class="iconfont icon">&#xe636;</span>
消息
<span class="iconfont num">{{#if inbox_total}}{{inbox_total}}{{/if}} &#xe604;</span>
<span class="iconfont num">{{inbox_total}} &#xe604;</span>
</a>
</div>
<div class="group-list">
... ...