@@ -60,8 +60,8 @@
},
onLoad(options) {
- this.addrId = options.addrId
if (options.addrId) {
+ this.addrId = options.addrId
this.getAddrDetail()
}
@@ -88,9 +88,12 @@
selectArea() {
this.areaShow = true
+
+ cancel(){
+ this.areaShow = false
+ },
confirmArea(obj) {
- // console.log(obj);
this.form.province = obj.province
this.form.provinceId = obj.provinceId
this.form.city = obj.city
@@ -102,7 +102,7 @@
getDefaultId() {
$http.post('/api/v1/mp/user/addr/queryDefault', {}).then(res => {
if (res.code == 0) {
- this.defaultId = res.data.addrId
+ this.defaultId = res && res.data && res.data.addrId
})