Authored by ccbikai

地址管理页面头部文字

... ... @@ -18,28 +18,31 @@ var $action = $('.action'),
$confim = $('.confim-mask'),
$pageWrap = $('.page-wrap'),
$backBtn = $('.nav-back'),
$navTitle = $('.nav-title'),
isSubmiting,
deleteId,
currentPage = 'address',
newArea = [];
// 清除原有链接
// 清除返回按钮原有链接
$backBtn.attr('href', 'javascript:void(0);');
window.rePosFooter();
// 自定义事件
// 自定义返回按钮事件
$backBtn.on('touchend', function(e) {
if (currentPage === 'edit') {
$pageWrap.hide();
$pageWrap.first().show();
e.preventDefault();
currentPage = 'address';
$navTitle.html('地址管理');
} else if (currentPage === 'list') {
$pageWrap.hide();
$editAddressPage.show();
e.preventDefault();
currentPage = 'edit';
$navTitle.html('修改地址');
} else {
window.history.go(-1);
}
... ... @@ -90,11 +93,13 @@ $confim.on('touchend', '.cancel', function() {
// 添加地址
$addAddress.on('touchend', function() {
editAddress();
$navTitle.html('添加新地址');
});
// 编辑或删除
$action.on('touchend', '.edit', function() {
editAddress($(this).data());
$navTitle.html('修改地址');
}).on('touchend', '.del', function() {
deleteId = $(this).data('id');
$confim.show();
... ... @@ -177,6 +182,7 @@ $addressListPage.on('touchend', '.address', function() {
$editAddressPage.show();
currentPage = 'edit';
$navTitle.html('修改地址');
// 恢复默认的三级选择
$addressListPage.hide();
... ...