Authored by 郭成尧

address-cache

... ... @@ -193,6 +193,7 @@ function bindAddressListEvent(html) {
if (window.localStorage && window.localStorage.getItem) {
chinaAddressList = window.localStorage.getItem('chinaAddressList');
}
if (chinaAddressList) {
bindAddressListEvent(chinaAddressList);
} else {
... ... @@ -201,12 +202,14 @@ if (chinaAddressList) {
$.ajax({
method: 'GET',
url: '/home/locationList',
timeout: 60000
timeout: 60000,
cache: true
}).then(function(html) {
bindAddressListEvent(html);
if (window.localStorage && window.localStorage.setItem) {
window.localStorage.setItem('chinaAddressList', html);
}
// if (window.localStorage && window.localStorage.setItem) {
// window.localStorage.setItem('chinaAddressList', html);
// }
}).fail(function() {
tip.show('获取省市区列表失败');
});
... ...