...
|
...
|
@@ -20,8 +20,7 @@ var $addressForm = $('.edit-address'), |
|
|
$area = $('.area'),
|
|
|
isSubmiting,
|
|
|
currentPage = 'edit',
|
|
|
newArea = [],
|
|
|
chinaAddressList;
|
|
|
newArea = [];
|
|
|
|
|
|
require('../common.js');
|
|
|
|
...
|
...
|
@@ -193,27 +192,28 @@ function bindAddressListEvent(html) { |
|
|
}
|
|
|
|
|
|
// 读取省市区列表缓存
|
|
|
if (window.localStorage && window.localStorage.getItem) {
|
|
|
chinaAddressList = window.localStorage.getItem('chinaAddressList');
|
|
|
}
|
|
|
// if (window.localStorage && window.localStorage.getItem) {
|
|
|
// chinaAddressList = window.localStorage.getItem('chinaAddressList');
|
|
|
// }
|
|
|
|
|
|
if (chinaAddressList) {
|
|
|
bindAddressListEvent(chinaAddressList);
|
|
|
} else {
|
|
|
// if (chinaAddressList) {
|
|
|
// bindAddressListEvent(chinaAddressList);
|
|
|
// } else {
|
|
|
|
|
|
// 省市区列表异步加载
|
|
|
$.ajax({
|
|
|
method: 'GET',
|
|
|
url: '/home/locationList',
|
|
|
timeout: 60000,
|
|
|
cache: true
|
|
|
}).then(function(html) {
|
|
|
bindAddressListEvent(html);
|
|
|
$.ajax({
|
|
|
method: 'GET',
|
|
|
url: '/home/locationList',
|
|
|
timeout: 60000,
|
|
|
cache: true
|
|
|
}).then(function(html) {
|
|
|
bindAddressListEvent(html);
|
|
|
|
|
|
// if (window.localStorage && window.localStorage.setItem) {
|
|
|
// window.localStorage.setItem('chinaAddressList', html);
|
|
|
// }
|
|
|
}).fail(function() {
|
|
|
tip.show('获取省市区列表失败');
|
|
|
});
|
|
|
} |
|
|
}).fail(function() {
|
|
|
tip.show('获取省市区列表失败');
|
|
|
});
|
|
|
|
|
|
// } |
...
|
...
|
|