Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into fix/issue
Showing
1 changed file
with
7 additions
and
3 deletions
@@ -119,7 +119,11 @@ $submit.on('touchend', function() { | @@ -119,7 +119,11 @@ $submit.on('touchend', function() { | ||
119 | }); | 119 | }); |
120 | 120 | ||
121 | // 省市区列表异步加载 | 121 | // 省市区列表异步加载 |
122 | -$.get('/home/locationList').then(function(html) { | 122 | +$.ajax({ |
123 | + method: 'GET', | ||
124 | + url: '/home/locationList', | ||
125 | + timeout: 60000 | ||
126 | +}).then(function(html) { | ||
123 | $addressListPage.html(html); | 127 | $addressListPage.html(html); |
124 | 128 | ||
125 | // 省市区 | 129 | // 省市区 |
@@ -141,7 +145,7 @@ $.get('/home/locationList').then(function(html) { | @@ -141,7 +145,7 @@ $.get('/home/locationList').then(function(html) { | ||
141 | if (e.target.tagName.toLowerCase() !== 'li') { | 145 | if (e.target.tagName.toLowerCase() !== 'li') { |
142 | $this = $this.parent('li'); | 146 | $this = $this.parent('li'); |
143 | } | 147 | } |
144 | - newArea.push($this.children('.caption').text()); | 148 | + newArea.push($this.children('.caption').text().trim()); |
145 | $this.siblings().hide(); | 149 | $this.siblings().hide(); |
146 | $this.children('ul').show().children('li').show(); | 150 | $this.children('ul').show().children('li').show(); |
147 | 151 | ||
@@ -157,7 +161,7 @@ $.get('/home/locationList').then(function(html) { | @@ -157,7 +161,7 @@ $.get('/home/locationList').then(function(html) { | ||
157 | var $this = $(e.target); | 161 | var $this = $(e.target); |
158 | 162 | ||
159 | // 填结果到 html | 163 | // 填结果到 html |
160 | - newArea.push($this.children('.caption').text()); | 164 | + newArea.push($this.text().trim()); |
161 | $('[name="area"]').val(newArea.join(' ')); | 165 | $('[name="area"]').val(newArea.join(' ')); |
162 | $('[name="area_code"]').val($this.data('id')); | 166 | $('[name="area_code"]').val($this.data('id')); |
163 | 167 |
-
Please register or login to post a comment