...
|
...
|
@@ -287,13 +287,7 @@ function newAddress(isInit) { |
|
|
address.show();
|
|
|
}
|
|
|
|
|
|
// 显示全部地址
|
|
|
$('.address-all').click(function() {
|
|
|
$(this).siblings('.address-list').removeClass('shrink').end().addClass('vhide');
|
|
|
});
|
|
|
|
|
|
// 新增地址
|
|
|
$('.new-address, .new-address-block').click(function() {
|
|
|
function newAddressHandle() {
|
|
|
|
|
|
// 判断是否超过20条地址
|
|
|
if ($('#address-list .address').length >= 20) {
|
...
|
...
|
@@ -302,8 +296,16 @@ $('.new-address, .new-address-block').click(function() { |
|
|
}
|
|
|
|
|
|
newAddress();
|
|
|
}
|
|
|
|
|
|
// 显示全部地址
|
|
|
$('.address-all').click(function() {
|
|
|
$(this).siblings('.address-list').removeClass('shrink').end().addClass('vhide');
|
|
|
});
|
|
|
|
|
|
// 新增地址
|
|
|
$('.new-address').click(newAddressHandle);
|
|
|
|
|
|
$('.address-list').on('click', '.address', function() {
|
|
|
|
|
|
// 地址切换
|
...
|
...
|
@@ -403,7 +405,7 @@ $('.address-list').on('click', '.address', function() { |
|
|
}
|
|
|
});
|
|
|
e.stopPropagation();
|
|
|
});
|
|
|
}).on('click', '.new-address-block', newAddressHandle);
|
|
|
|
|
|
// 页面加载时请求地址列表,若有则展示列表;若无则直接显示新建弹窗并不可被关闭
|
|
|
$.ajax({
|
...
|
...
|
|