diff --git a/buyer/src/components/map/multiple-map.vue b/buyer/src/components/map/multiple-map.vue index 9e164efa..89153cfa 100644 --- a/buyer/src/components/map/multiple-map.vue +++ b/buyer/src/components/map/multiple-map.vue @@ -75,13 +75,21 @@ export default { if (res.result.length && val.id !== 0) { this.chiosend[index] = val } + else if(!res.result.length){ + this.chiosend[index] = val + } this.data[level] = res.result; if (level == 'city') { this.data.area = [] this.data.street = [] + this.chiosend.splice(1, 3, "","",""); } if (level == 'area') { this.data.street = [] + this.chiosend.splice(2, 2, "",""); + } + if (level == 'street') { + this.chiosend.splice(3, 1, ""); } }); } diff --git a/manager/src/components/map/multiple-map.vue b/manager/src/components/map/multiple-map.vue index 41d62a59..a3d34b75 100644 --- a/manager/src/components/map/multiple-map.vue +++ b/manager/src/components/map/multiple-map.vue @@ -72,16 +72,24 @@ export default { } else { API_Setup.getChildRegion(val.id).then((res) => { - if ( val.id !== 0) { + if (res.result.length && val.id !== 0) { + this.chiosend[index] = val + } + else if(!res.result.length){ this.chiosend[index] = val } this.data[level] = res.result; if (level == 'city') { this.data.area = [] this.data.street = [] + this.chiosend.splice(1, 3, "","",""); } if (level == 'area') { this.data.street = [] + this.chiosend.splice(2, 2, "",""); + } + if (level == 'street') { + this.chiosend.splice(3, 1, ""); } }); } diff --git a/seller/src/views/my-components/map/multiple-map.vue b/seller/src/views/my-components/map/multiple-map.vue index 9e28a28f..c0969efb 100644 --- a/seller/src/views/my-components/map/multiple-map.vue +++ b/seller/src/views/my-components/map/multiple-map.vue @@ -75,13 +75,21 @@ export default { if (res.result.length && val.id !== 0) { this.chiosend[index] = val } + else if(!res.result.length){ + this.chiosend[index] = val + } this.data[level] = res.result; if (level == 'city') { this.data.area = [] this.data.street = [] + this.chiosend.splice(1, 3, "","",""); } if (level == 'area') { this.data.street = [] + this.chiosend.splice(2, 2, "",""); + } + if (level == 'street') { + this.chiosend.splice(3, 1, ""); } }); }