Authored by zhangxiaoru

添加地址

... ... @@ -8,7 +8,7 @@
</div>
{{/ address}}
<a class="add-address" data-href="/home/addressAct?refer=modify" href='/home/addressAct?refer=modify'>
<a class="add-address" data-href="/home/addressAct?refer=modify">
添加新地址
</a>
... ...
... ... @@ -12,6 +12,8 @@ var $confimMod = $('.confim-modify-mask'),
orderCode = $modifyAdd.data('orderCode'),
$pageWrap = $('.page-wrap'),
$footer = $('#yoho-footer'),
$addAddress = $('.add-address'),
$addressItem = $('.address-item'),
selectId;
require('../common');
... ... @@ -62,3 +64,14 @@ $confimMod.on('touchend', '.cancel', function() {
});
return false;
});
//添加地址
if ($addressItem.length < 5) {
$addAddress.attr('href', $addAddress.data('href'));
}
$addAddress.on('touchend', function() {
if ($addressItem.length >= 5) {
tip.show('您最多添加5个收货地址');
return false;
}
});
\ No newline at end of file
... ...