Showing
1 changed file
with
7 additions
and
4 deletions
@@ -193,6 +193,7 @@ function bindAddressListEvent(html) { | @@ -193,6 +193,7 @@ function bindAddressListEvent(html) { | ||
193 | if (window.localStorage && window.localStorage.getItem) { | 193 | if (window.localStorage && window.localStorage.getItem) { |
194 | chinaAddressList = window.localStorage.getItem('chinaAddressList'); | 194 | chinaAddressList = window.localStorage.getItem('chinaAddressList'); |
195 | } | 195 | } |
196 | + | ||
196 | if (chinaAddressList) { | 197 | if (chinaAddressList) { |
197 | bindAddressListEvent(chinaAddressList); | 198 | bindAddressListEvent(chinaAddressList); |
198 | } else { | 199 | } else { |
@@ -201,12 +202,14 @@ if (chinaAddressList) { | @@ -201,12 +202,14 @@ if (chinaAddressList) { | ||
201 | $.ajax({ | 202 | $.ajax({ |
202 | method: 'GET', | 203 | method: 'GET', |
203 | url: '/home/locationList', | 204 | url: '/home/locationList', |
204 | - timeout: 60000 | 205 | + timeout: 60000, |
206 | + cache: true | ||
205 | }).then(function(html) { | 207 | }).then(function(html) { |
206 | bindAddressListEvent(html); | 208 | bindAddressListEvent(html); |
207 | - if (window.localStorage && window.localStorage.setItem) { | ||
208 | - window.localStorage.setItem('chinaAddressList', html); | ||
209 | - } | 209 | + |
210 | + // if (window.localStorage && window.localStorage.setItem) { | ||
211 | + // window.localStorage.setItem('chinaAddressList', html); | ||
212 | + // } | ||
210 | }).fail(function() { | 213 | }).fail(function() { |
211 | tip.show('获取省市区列表失败'); | 214 | tip.show('获取省市区列表失败'); |
212 | }); | 215 | }); |
-
Please register or login to post a comment