feat: 添加镇
This commit is contained in:
@@ -67,6 +67,7 @@ export default {
|
||||
provinceId: null,// 省份ID
|
||||
cityId: null,// 城市ID
|
||||
areaId: null,// 区域ID
|
||||
townshipId: null,// 街道ID
|
||||
address: null,// 详细地址
|
||||
},
|
||||
regionShow: false,
|
||||
@@ -96,6 +97,7 @@ export default {
|
||||
const resp = await getAddressDetail(parasm);
|
||||
if (resp && resp.bizcode === 100) {
|
||||
const data = resp.data;
|
||||
|
||||
this.form.id = id;
|
||||
this.form.name = data.name;// 收货人
|
||||
this.form.mobile = data.phone;// 手机号码
|
||||
@@ -103,7 +105,9 @@ export default {
|
||||
this.form.provinceId = data.provinceId;// 省份ID
|
||||
this.form.cityId = data.cityId;// 城市ID
|
||||
this.form.areaId = data.areaId;// 区域ID
|
||||
this.form.townshipId = data.townshipId;// 街道ID
|
||||
this.form.address = data.address;//
|
||||
|
||||
const regionStr = [];
|
||||
if (data.countryName) {
|
||||
regionStr.push(data.countryName);
|
||||
@@ -129,7 +133,8 @@ export default {
|
||||
const province = nation && nation.length !== 0 ? await this.getRegion(nation[0].id) : [];
|
||||
const city = province && province.length !== 0 ? await this.getRegion(province[0].id) : [];
|
||||
const area = city && city.length !== 0 ? await this.getRegion(city[0].id) : [];
|
||||
this.regionColumns = [nation, province, city, area];
|
||||
console.log('选择地址的弹框', nation, province, city, area,status)
|
||||
this.regionColumns = [nation, province, city, area,];
|
||||
} else {
|
||||
this.regionColumns = [[], [], [], []];
|
||||
}
|
||||
@@ -189,12 +194,13 @@ export default {
|
||||
regionId.push(item.id);
|
||||
}
|
||||
})
|
||||
console.log('提交地址--1',value)
|
||||
this.form.regionStr = regionStr;
|
||||
if (regionId && regionId.length !== 0) {
|
||||
this.form.countryId = regionId[0] ? regionId[0] : null;
|
||||
this.form.provinceId = regionId[1] ? regionId[1] : null;
|
||||
this.form.cityId = regionId[2] ? regionId[2] : null;
|
||||
this.form.areaId = regionId[3] ? regionId[3] : null;
|
||||
this.form.townshipId = regionId[4] ? regionId[4] : null;
|
||||
}
|
||||
this.regionShowCheck(false);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user