Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
ccbikai
9 years ago
Commit
7332f70d594ee6e4a55b113f1b454995da200d29
1 parent
dcaa31c8
地址管理页面头部文字
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
static/js/me/address.js
static/js/me/address.js
View file @
7332f70
...
...
@@ -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
();
...
...
Please
register
or
login
to post a comment