...
|
...
|
@@ -161,6 +161,10 @@ |
|
|
<script>
|
|
|
require('../../../scss/home/_address.css');
|
|
|
|
|
|
let areaForm = $('.edit-address');
|
|
|
let areaCode = areaForm.find('input[name=area_code]');
|
|
|
let area = areaForm.find('input[name=area]');
|
|
|
|
|
|
module.exports = {
|
|
|
data() {
|
|
|
return {
|
...
|
...
|
@@ -249,6 +253,14 @@ |
|
|
$.get('/home/getaddress.json', {
|
|
|
id: id
|
|
|
}, resultData => {
|
|
|
if (resultData.length < 1) {
|
|
|
areaCode.val(id);
|
|
|
area.val(this.province.title + ' '
|
|
|
+ this.city.title + ' '
|
|
|
+ this.area.title + ' '
|
|
|
+ this.street.title);
|
|
|
this.show = false;
|
|
|
}
|
|
|
|
|
|
/* 数据绑定 */
|
|
|
switch((id + '').length) {
|
...
|
...
|
@@ -274,6 +286,11 @@ |
|
|
|
|
|
/* 关闭地址选择组件 */
|
|
|
closeAddBox() {
|
|
|
areaCode.val(this.street.id || this.area.id || this.city.id || this.province.id);
|
|
|
area.val(this.province.title + ' '
|
|
|
+ this.city.title + ' '
|
|
|
+ this.area.title + ' '
|
|
|
+ this.street.title);
|
|
|
this.show = false;
|
|
|
},
|
|
|
|
...
|
...
|
|