删除地址
This commit is contained in:
@@ -267,7 +267,7 @@
|
|||||||
addconfirm(e) { //点击确定按钮
|
addconfirm(e) { //点击确定按钮
|
||||||
this.addressChanged = true
|
this.addressChanged = true
|
||||||
this.addreShow = false;
|
this.addreShow = false;
|
||||||
this.addressForm.areaidpathtext = e.value[0].UName + ' ' + e.value[1].UName + ' ' + e.value[2].UName
|
this.addressForm.areaidpathtext = e.value[0].UName + '-' + e.value[1].UName + '-' + e.value[2].UName
|
||||||
this.provId = e.value[0].provId
|
this.provId = e.value[0].provId
|
||||||
this.cityId = e.value[1].cityId
|
this.cityId = e.value[1].cityId
|
||||||
this.countyId = e.value[2].regionCode
|
this.countyId = e.value[2].regionCode
|
||||||
@@ -366,7 +366,7 @@
|
|||||||
'username':res.list[this.editIndex].consigneeName,
|
'username':res.list[this.editIndex].consigneeName,
|
||||||
'isdefault':res.list[this.editIndex].isDefault,
|
'isdefault':res.list[this.editIndex].isDefault,
|
||||||
'isDafault':res.list[this.editIndex].isDefault == 1 ? true : false,
|
'isDafault':res.list[this.editIndex].isDefault == 1 ? true : false,
|
||||||
'areaidpathtext':res.list[this.editIndex].province + res.list[this.editIndex].city + res.list[this.editIndex].county
|
'areaidpathtext':res.list[this.editIndex].province +'-'+ res.list[this.editIndex].city +'-'+ res.list[this.editIndex].county
|
||||||
,'addressid':res.list[this.editIndex].id
|
,'addressid':res.list[this.editIndex].id
|
||||||
}
|
}
|
||||||
this.countyId = res.list[this.editIndex].regionCode
|
this.countyId = res.list[this.editIndex].regionCode
|
||||||
@@ -383,15 +383,9 @@
|
|||||||
let addressArr = [];
|
let addressArr = [];
|
||||||
addressArr.push(this.addressForm.addressid)
|
addressArr.push(this.addressForm.addressid)
|
||||||
this.deleteShow = false
|
this.deleteShow = false
|
||||||
|
this.$http
|
||||||
$http.request({
|
.get(`book/userAddress/delete?id=${this.addressForm.addressid}`)
|
||||||
url: "book/useraddress/delete",
|
.then(res => {
|
||||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
|
||||||
data:addressArr,
|
|
||||||
header: { //默认 无 说明:请求头
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '地址删除成功',
|
title: '地址删除成功',
|
||||||
|
|||||||
Reference in New Issue
Block a user