Toggle navigation
Toggle navigation
This project
Loading...
Sign in
chenchao
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
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
Plain Diff
Browse Files
Authored by
xuqi
9 years ago
Commit
b30471202d0df5fea6ea2de09034d9782042a427
2 parents
2225b90e
712dbe94
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
9 deletions
static/js/me/address-act.js
web-static/index.js
web-static/js/passport/entry.js
static/js/me/address-act.js
View file @
b304712
...
...
@@ -21,6 +21,7 @@ var $addressForm = $('.edit-address'),
isSubmiting
,
currentPage
=
'edit'
,
newArea
=
[],
chinaAddressList
,
queryString
=
$
.
queryString
();
$
(
$editAddressPage
,
$addressListPage
).
css
(
'min-height'
,
function
()
{
...
...
@@ -118,12 +119,7 @@ $submit.on('touchend', function() {
$
(
this
).
removeClass
(
'highlight'
);
});
// 省市区列表异步加载
$
.
ajax
({
method
:
'GET'
,
url
:
'/home/locationList'
,
timeout
:
60000
}).
then
(
function
(
html
)
{
function
bindAddressListEvent
(
html
)
{
$addressListPage
.
html
(
html
);
// 省市区
...
...
@@ -185,6 +181,27 @@ $.ajax({
}).
on
(
'touchend touchcancel'
,
'li'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
});
}).
fail
(
function
()
{
tip
.
show
(
'获取省市区列表失败'
);
});
}
// 读取省市区列表缓存
if
(
window
.
localStorage
&&
window
.
localStorage
.
getItem
)
{
chinaAddressList
=
window
.
localStorage
.
getItem
(
'chinaAddressList'
);
}
if
(
chinaAddressList
)
{
bindAddressListEvent
(
chinaAddressList
);
}
else
{
// 省市区列表异步加载
$
.
ajax
({
method
:
'GET'
,
url
:
'/home/locationList'
,
timeout
:
60000
}).
then
(
function
(
html
)
{
bindAddressListEvent
(
html
);
if
(
window
.
localStorage
&&
window
.
localStorage
.
setItem
)
{
window
.
localStorage
.
setItem
(
'chinaAddressList'
,
html
);
}
}).
fail
(
function
()
{
tip
.
show
(
'获取省市区列表失败'
);
});
}
...
...
web-static/index.js
View file @
b304712
...
...
@@ -4,5 +4,6 @@ require('./js/common');
require
(
'./js/product/entry'
);
require
(
'./js/home/entry'
);
require
(
'./js/passport/entry'
);
module
.
exports
=
webYohobuy
;
...
...
web-static/js/passport/entry.js
0 → 100644
View file @
b304712
/*
* 密码中心打包入口文件
*/
require
(
'./reg'
);
require
(
'./back'
);
require
(
'./login'
);
require
(
'./reset'
);
\ No newline at end of file
...
...
Please
register
or
login
to post a comment