|
|
|
@ -240,6 +240,9 @@ export default {
|
|
|
|
|
vm.$set(vm.selectData.area, "value", editItem.area);
|
|
|
|
|
vm.$set(vm.selectData.city, "value", editItem.city);
|
|
|
|
|
vm.$set(vm.selectData.province, "value", editItem.province);
|
|
|
|
|
vm.$set(vm.selectData.area, "code", editItem.areaCode);
|
|
|
|
|
vm.$set(vm.selectData.city, "code", editItem.cityCode);
|
|
|
|
|
vm.$set(vm.selectData.province, "code", editItem.provinceCode);
|
|
|
|
|
vm.$set(vm, "detailAddress", editItem.detailAddress);
|
|
|
|
|
vm.$set(vm, "defaultAddress", editItem.isDefault);
|
|
|
|
|
vm.$set(vm, "addressUser", editItem.name);
|
|
|
|
@ -257,6 +260,8 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
async onAddAddress() {
|
|
|
|
|
let vm = this;
|
|
|
|
|
let curItem = vm.addressList.find((item) => item.id == vm.curAddressListItem.id);
|
|
|
|
|
console.log(vm.selectData)
|
|
|
|
|
if (!vm.selectData?.area?.code) {
|
|
|
|
|
vm.$message.error("请选择所在区域~");
|
|
|
|
|
return;
|
|
|
|
@ -269,7 +274,7 @@ export default {
|
|
|
|
|
vm.$message.error("请输入收货人~");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!IsPhone(vm.addressPhone)) {
|
|
|
|
|
if (!IsPhone(vm.addressPhone)&&vm.addressPhone!=curItem.phone) {
|
|
|
|
|
vm.$message.error("请输入收货人手机号码~");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|