...
|
...
|
@@ -136,7 +136,7 @@ export default { |
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(["addressTags"]),
|
|
|
...mapState(["addressTags", "updateAddressInfo"]),
|
|
|
submitClass() {
|
|
|
return [
|
|
|
"sure-btn",
|
...
|
...
|
@@ -301,7 +301,7 @@ export default { |
|
|
},
|
|
|
|
|
|
activated() {
|
|
|
let { update, title, item, code } = this.$route.params;
|
|
|
let { update, item, code } = this.$route.params;
|
|
|
// 订单编辑 不查标签
|
|
|
if (!code) {
|
|
|
this.fetchAddressTags();
|
...
|
...
|
@@ -309,17 +309,20 @@ export default { |
|
|
|
|
|
this.isUpdate = update;
|
|
|
this.title = update ? "编辑地址" : "添加地址";
|
|
|
|
|
|
let addressInfo = this.updateAddressInfo;
|
|
|
|
|
|
if (update) {
|
|
|
item = JSON.parse(item || "{}");
|
|
|
this.updateMobileNum = item.mobile;
|
|
|
this.model.consignee = item.consignee;
|
|
|
this.model.address_id = item.address_id;
|
|
|
this.model.mobile = item.mobile;
|
|
|
this.model.area_code = item.area_code || item.areaCode;
|
|
|
this.model.area = item.area;
|
|
|
this.model.address = item.address;
|
|
|
this.model.tag_code = item.tag_code;
|
|
|
this.model.is_default = item.is_default === "Y" ? true : false;
|
|
|
addressInfo = JSON.parse(addressInfo || "{}");
|
|
|
this.updateMobileNum = addressInfo.mobile;
|
|
|
this.model.consignee = addressInfo.consignee;
|
|
|
this.model.address_id = addressInfo.address_id;
|
|
|
this.model.mobile = addressInfo.mobile;
|
|
|
this.model.area_code = addressInfo.area_code || addressInfo.areaCode;
|
|
|
this.model.area = addressInfo.area;
|
|
|
this.model.address = addressInfo.address;
|
|
|
this.model.tag_code = addressInfo.tag_code;
|
|
|
this.model.is_default = addressInfo.is_default === "Y" ? true : false;
|
|
|
} else {
|
|
|
this.model = {};
|
|
|
}
|
...
|
...
|
|