This commit is contained in:
2020-06-24 16:39:31 +08:00
parent 8c993da2cd
commit 28e80b49ff
14 changed files with 132 additions and 54 deletions

View File

@@ -58,13 +58,13 @@ export default {
this.getAreaData();
},
created() {
// console.log(this.info);
console.log(typeof this.info);
this.initAddressInfo();
},
methods: {
// 判断是不是编辑页面 数据初始化
initAddressInfo() {
if(JSON.stringify(this.info) != '{}') {
if(this.info) {
[this.name, this.phone, this.address, this.area, this.area_id, this.city_id] = [
this.info.address_realname,
this.info.address_mob_phone,
@@ -78,7 +78,7 @@ export default {
},
// 判断是不是编辑页面 调用接口
confirmBtn() {
JSON.stringify(this.info) != '{}' ? this.editAddress() : this.addAddress();
this.info ? this.editAddress() : this.addAddress();
},
// 验证
validateValue() {