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