| | |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | uni.showToast({ title: '删除成功', icon: 'success', mask: true, duration: 1500 }) |
| | | uni.$emit('addressDele') |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | |
| | | }) |
| | | }, |
| | | submit() { |
| | | if (!this.form.name) return uni.showToast({ |
| | | title: '收件人不能为空!', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form.phone) return uni.showToast({ |
| | | title: '联系电话不能为空!', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form.areaName) return uni.showToast({ |
| | | title: '所在地区不能为空!', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form.addr) return uni.showToast({ |
| | | title: '详细地址不能为空!', |
| | | icon: 'none' |
| | | }) |
| | | if (this.type === 1) { |
| | | this.$u.api.createAddr(this.form) |
| | | .then(res => { |