| | |
| | | }, |
| | | async init_area() { |
| | | if (this.regionDataPlus && this.regionDataPlus.length > 0) { |
| | | |
| | | }else{ |
| | | |
| | | } else { |
| | | var a = this.$storage.getItem('cache_area') |
| | | if (a) { |
| | | this.regionDataPlus = JSON.parse(a) || [] |
| | |
| | | if (code === 0) { |
| | | this.$refs.popup_form.close() |
| | | this.$message.showToast(this.submitForm.id ? '修改成功' : '新增成功') |
| | | |
| | | let tmp = this |
| | | setTimeout(() => { |
| | | tmp.page.current = 1 |
| | | tmp.refreshList() |
| | | }, 300) |
| | | //如果当前选择的地址是这个,需要更新一下数据 |
| | | if (this.address.id && this.submitForm.id === this.address.id) { |
| | | this.$store.commit('setDefaultAddress', { |
| | | ...this.submitForm |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | |