Authored by Rock Zhang

更新到最新静态资源

... ... @@ -5311,10 +5311,33 @@ var $action = $('.action'),
$area = $('.area'),
$footer = $('#yoho-footer'),
$confim = $('.confim-mask'),
$pageWrap = $('.page-wrap'),
$backBtn = $('.nav-back'),
isSubmiting,
deleteId,
currentPage = 'address',
newArea = [];
// 清除原有链接
$backBtn.attr('href', 'javascript:void(0);');
// 自定义事件
$backBtn.on('touchend', function(e) {
if (currentPage === 'edit') {
$pageWrap.hide();
$pageWrap.first().show();
e.preventDefault();
currentPage = 'address';
} else if (currentPage === 'list') {
$pageWrap.hide();
$editAddressPage.show();
e.preventDefault();
currentPage = 'edit';
} else {
window.history.go(-1);
}
});
function editAddress(data) {
data = data || {};
$addressForm.find('[name="id"]').val(data.id || '');
... ... @@ -5323,7 +5346,10 @@ function editAddress(data) {
$addressForm.find('[name="area_code"]').val(data.areaCode || '');
$addressForm.find('[name="area"]').val(data.area || '');
$addressForm.find('[name="address"]').val(data.address || '');
currentPage = 'edit';
$footer.hide();
$pageWrap.hide();
$editAddressPage.show();
}
... ... @@ -5423,11 +5449,15 @@ $addressForm.on('submit', function() {
// 省市区
$area.on('touchend', function() {
$footer.hide();
$pageWrap.hide();
$addressListPage.show();
currentPage = 'list';
});
$addressListPage.on('touchend', '.address', function() {
newArea.push($(this).children('.caption').text());
var caption = $(this).children('.caption').text();
newArea.push(caption);
$(this).siblings().hide();
$(this).children('ul').show();
return false;
... ... @@ -5438,11 +5468,13 @@ $addressListPage.on('touchend', '.address', function() {
$('[name="area"]').val(newArea.join(' '));
$('[name="area_code"]').val($(this).data('id'));
$editAddressPage.show();
currentPage = 'edit';
// 恢复默认的三级选择
$addressListPage.hide();
$addressListPage.find('ul').hide();
$addressListPage.children('ul').show().children('li').show();
$footer.show();
newArea = [];
return false;
});
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.