|
@@ -109,9 +109,9 @@ export default {
|
|
prov: false,
|
|
prov: false,
|
|
city: false,
|
|
city: false,
|
|
dist: false,
|
|
dist: false,
|
|
- currentPID: idArr[0] || 18,
|
|
|
|
- currentCID: idArr[1] || 3,
|
|
|
|
- currentSID: idArr[2] || 2,
|
|
|
|
|
|
+ currentPID: idArr[0] !== '' ? idArr[0] : 18,
|
|
|
|
+ currentCID: idArr[1] !== '' ? idArr[1] : 3,
|
|
|
|
+ currentSID: idArr[2] !== '' ? idArr[2] : 2,
|
|
areaPath: cloneObj(this.address.areaPath)
|
|
areaPath: cloneObj(this.address.areaPath)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -136,6 +136,8 @@ export default {
|
|
watch: {
|
|
watch: {
|
|
currentProv () {
|
|
currentProv () {
|
|
this.currentCID = 0
|
|
this.currentCID = 0
|
|
|
|
+ },
|
|
|
|
+ currentCID () {
|
|
this.currentSID = 0
|
|
this.currentSID = 0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -171,8 +173,10 @@ export default {
|
|
return this.$toast.show('warn', this.langAccount.fill)
|
|
return this.$toast.show('warn', this.langAccount.fill)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ params['id'] = this.address.id
|
|
|
|
+ let url = this.address.id ? 'updateAddress' : 'insertAddress'
|
|
this.$http
|
|
this.$http
|
|
- .post('/user/updateAddress', params, {
|
|
|
|
|
|
+ .post(`/user/${url}`, params, {
|
|
headers: {
|
|
headers: {
|
|
token: this.token
|
|
token: this.token
|
|
}
|
|
}
|