...
|
...
|
@@ -35,6 +35,7 @@ var Order = { |
|
|
$spanPayTypeLegend: $('span.pay-type-legend'),
|
|
|
$supportType: $('.support-type'),
|
|
|
$existAddressList: $('.exist-address-list').find('li'),
|
|
|
$existAddress: $('.exist-address-list').find('input[name="exist-address"]'),
|
|
|
$payTimeModify: $('.pay-time-modify'),
|
|
|
$switchPayModify: $('.switch-pay-modify')
|
|
|
},
|
...
|
...
|
@@ -118,26 +119,27 @@ var Order = { |
|
|
if (!$(this).data('expand')) {
|
|
|
$('.address-list-inner').addClass('hide');
|
|
|
|
|
|
$(this).data('expand', 'expand').text('[修改]');
|
|
|
$(this).data('expand', 'expand').text('[不保存并关闭]');
|
|
|
|
|
|
} else {
|
|
|
$('.address-list-inner').removeClass('hide');
|
|
|
|
|
|
$(this).removeData('expand').text('[不保存并关闭]');
|
|
|
$(this).removeData('expand').text('[修改]');
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
//展开新地址填写表单
|
|
|
e.$addAddress.click(function() {
|
|
|
|
|
|
if (e.$addressManage.hasClass('hide')) {
|
|
|
//支付及送货时间
|
|
|
e.$switchPayModify.click(function() {
|
|
|
|
|
|
e.$addressManage.removeClass('hide');
|
|
|
if (e.$payTimeModify.hasClass('hide')) {
|
|
|
e.$payTimeModify.removeClass('hide');
|
|
|
$(this).text('[不保存并关闭]');
|
|
|
} else {
|
|
|
return;
|
|
|
e.$payTimeModify.addClass('hide');
|
|
|
$(this).text('[修改]');
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
e.$spanPayTypeLegend.click(function() {
|
...
|
...
|
@@ -146,20 +148,17 @@ var Order = { |
|
|
e.$supportType.toggleClass('hide');
|
|
|
});
|
|
|
|
|
|
e.$existAddressList.click(function(event) {
|
|
|
$(document).on('click', '.exist-address-list li', function() {
|
|
|
|
|
|
e.$existAddressList.removeClass('active');
|
|
|
$(this).addClass('active');
|
|
|
|
|
|
e.$existAddress.removeAttr('checked');
|
|
|
$(this).find('input[name="exist-address"]').attr('checked', 'checked');
|
|
|
|
|
|
if ($(this).hasClass('use-new-address')) {
|
|
|
e.$addAddress.attr('checked', true);// 必须在trigger前
|
|
|
e.$addAddress.trigger('click');
|
|
|
e.$addressManage.removeClass('hide');
|
|
|
}
|
|
|
|
|
|
event.stopPropagation();
|
|
|
});
|
|
|
|
|
|
e.$switchPayModify.click(function() {
|
|
|
e.$payTimeModify.toggleClass('hide');
|
|
|
});
|
|
|
},
|
|
|
|
...
|
...
|
|