|
@@ -161,6 +161,10 @@ |
|
@@ -161,6 +161,10 @@ |
161
|
<script>
|
161
|
<script>
|
162
|
require('../../../scss/home/_address.css');
|
162
|
require('../../../scss/home/_address.css');
|
163
|
|
163
|
|
|
|
164
|
+ let areaForm = $('.edit-address');
|
|
|
165
|
+ let areaCode = areaForm.find('input[name=area_code]');
|
|
|
166
|
+ let area = areaForm.find('input[name=area]');
|
|
|
167
|
+
|
164
|
module.exports = {
|
168
|
module.exports = {
|
165
|
data() {
|
169
|
data() {
|
166
|
return {
|
170
|
return {
|
|
@@ -249,6 +253,14 @@ |
|
@@ -249,6 +253,14 @@ |
249
|
$.get('/home/getaddress.json', {
|
253
|
$.get('/home/getaddress.json', {
|
250
|
id: id
|
254
|
id: id
|
251
|
}, resultData => {
|
255
|
}, resultData => {
|
|
|
256
|
+ if (resultData.length < 1) {
|
|
|
257
|
+ areaCode.val(id);
|
|
|
258
|
+ area.val(this.province.title + ' '
|
|
|
259
|
+ + this.city.title + ' '
|
|
|
260
|
+ + this.area.title + ' '
|
|
|
261
|
+ + this.street.title);
|
|
|
262
|
+ this.show = false;
|
|
|
263
|
+ }
|
252
|
|
264
|
|
253
|
/* 数据绑定 */
|
265
|
/* 数据绑定 */
|
254
|
switch((id + '').length) {
|
266
|
switch((id + '').length) {
|
|
@@ -274,6 +286,11 @@ |
|
@@ -274,6 +286,11 @@ |
274
|
|
286
|
|
275
|
/* 关闭地址选择组件 */
|
287
|
/* 关闭地址选择组件 */
|
276
|
closeAddBox() {
|
288
|
closeAddBox() {
|
|
|
289
|
+ areaCode.val(this.street.id || this.area.id || this.city.id || this.province.id);
|
|
|
290
|
+ area.val(this.province.title + ' '
|
|
|
291
|
+ + this.city.title + ' '
|
|
|
292
|
+ + this.area.title + ' '
|
|
|
293
|
+ + this.street.title);
|
277
|
this.show = false;
|
294
|
this.show = false;
|
278
|
},
|
295
|
},
|
279
|
|
296
|
|