|
|
|
@ -117,43 +117,39 @@ |
|
|
|
|
}, |
|
|
|
|
// 获取多列的索引 |
|
|
|
|
multiChange: function(e) { |
|
|
|
|
// console.log(e); |
|
|
|
|
var _this = this; |
|
|
|
|
var multiIndex = e.detail.value; |
|
|
|
|
console.log(multiIndex); |
|
|
|
|
this.multiIndex = multiIndex; |
|
|
|
|
|
|
|
|
|
this.multiIndex = e.detail.value; |
|
|
|
|
let a_name = this.multiArray[0][e.detail.value[0]].name; |
|
|
|
|
let a_id = this.multiArray[0][e.detail.value[0]].id; |
|
|
|
|
let b_name = this.multiArray[1][e.detail.value[1]].name; |
|
|
|
|
let b_id = this.multiArray[1][e.detail.value[1]].id; |
|
|
|
|
let c_name = this.multiArray[2][e.detail.value[2]].name; |
|
|
|
|
let c_id = this.multiArray[2][e.detail.value[2]].id; |
|
|
|
|
this.cityInfo.province = a_name; |
|
|
|
|
this.cityInfo.city =b_name; |
|
|
|
|
this.cityInfo.area = c_name; |
|
|
|
|
this.form.region = [{ |
|
|
|
|
value: a_id, |
|
|
|
|
label: a_name |
|
|
|
|
}, { |
|
|
|
|
value: b_id, |
|
|
|
|
label: b_name |
|
|
|
|
}, { |
|
|
|
|
value: c_id, |
|
|
|
|
label: c_name |
|
|
|
|
}]; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 选择列 |
|
|
|
|
columnChange: function(e) { |
|
|
|
|
// console.log(e); |
|
|
|
|
var _this = this; |
|
|
|
|
var multiData = _this.multiData; |
|
|
|
|
var multiIndex = _this.multiIndex; |
|
|
|
|
var columnIndex = e.detail.column; |
|
|
|
|
var columnValue = e.detail.value; |
|
|
|
|
multiIndex[columnIndex] = columnValue; |
|
|
|
|
_this.multiIndex[columnIndex] = columnValue; |
|
|
|
|
this.multiArray = [ |
|
|
|
|
multiData, |
|
|
|
|
multiData[multiIndex[0]].children, |
|
|
|
|
multiData[multiIndex[0]].children[multiIndex[1]].children,] |
|
|
|
|
}, |
|
|
|
|
bindCityChange(e) { |
|
|
|
|
this.cityInfo.province = e.detail.value[0]; |
|
|
|
|
this.cityInfo.city = e.detail.value[1]; |
|
|
|
|
this.cityInfo.area = e.detail.value[2]; |
|
|
|
|
this.form.region = e.detail.id; |
|
|
|
|
this.form.region = [{ |
|
|
|
|
value: e.detail.id[0], |
|
|
|
|
label: e.detail.value[0] |
|
|
|
|
}, { |
|
|
|
|
value: e.detail.id[1], |
|
|
|
|
label: e.detail.value[1] |
|
|
|
|
}, { |
|
|
|
|
value: e.detail.id[2], |
|
|
|
|
label: e.detail.value[2] |
|
|
|
|
}]; |
|
|
|
|
_this.multiData, |
|
|
|
|
_this.multiData[_this.multiIndex[0]].children, |
|
|
|
|
_this.multiData[_this.multiIndex[0]].children[_this.multiIndex[1]].children |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
saveAddress() { |
|
|
|
|
// 保存收货地址 |
|
|
|
@ -196,7 +192,6 @@ |
|
|
|
|
} |
|
|
|
|
AddressApi.edit(that.addressId, that.form) |
|
|
|
|
.then(result => { |
|
|
|
|
return |
|
|
|
|
that.$toast(result.message) |
|
|
|
|
setTimeout(() => { |
|
|
|
|
uni.navigateBack() |
|
|
|
|