|
@@ -65,15 +65,15 @@
|
|
|
form:{
|
|
|
name:'', // 名称
|
|
|
mobile:'', // 手机号码
|
|
|
- receiveAddress: {
|
|
|
- provinceName: '',// 省
|
|
|
- cityName: '',// 市
|
|
|
- districtName: '', // 区
|
|
|
- receiveAddress: '',// 详细地址
|
|
|
- receiveAreasName:'',
|
|
|
- lat:'',
|
|
|
- lng:''
|
|
|
- }
|
|
|
+ },
|
|
|
+ reverseReceiveAddress: {
|
|
|
+ provinceName: '',// 省
|
|
|
+ cityName: '',// 市
|
|
|
+ districtName: '', // 区
|
|
|
+ receiveAddress: '',// 详细地址
|
|
|
+ receiveAreasName:'',
|
|
|
+ lat:'',
|
|
|
+ lng:''
|
|
|
},
|
|
|
itemId:'',// 店铺id
|
|
|
pageInfo:{}, // 页面数据
|
|
@@ -96,12 +96,13 @@
|
|
|
if(res.status==200){
|
|
|
this.form.name=res.data.name? res.data.name:''
|
|
|
this.form.mobile=res.data.mobile
|
|
|
- this.form.receiveAddress.provinceName=res.data.receiveAddressVO?res.data.receiveAddressVO.provinceName:''
|
|
|
- this.form.receiveAddress.cityName=res.data.receiveAddressVO?res.data.receiveAddressVO.cityName:''
|
|
|
- this.form.receiveAddress.districtName=res.data.receiveAddressVO?res.data.receiveAddressVO.districtName:''
|
|
|
- this.form.receiveAddress.receiveAddress=res.data.receiveAddressVO?res.data.receiveAddressVO.receiveAddress:''
|
|
|
- this.form.receiveAddress.receiveAreasName=res.data.receiveAddressVO?res.data.receiveAddressVO.receiveAreasName:''
|
|
|
- this.photograph=res.data.receiveAddressVO?res.data.receiveAddressVO.headerImageList:[]
|
|
|
+ this.reverseReceiveAddress=Object.assign(this.reverseReceiveAddress,res.data.this.reverseReceiveAddress?res.data.this.reverseReceiveAddress:null)
|
|
|
+ // this.form.receiveAddress.provinceName=res.data.receiveAddressVO?res.data.receiveAddressVO.provinceName:''
|
|
|
+ // this.form.receiveAddress.cityName=res.data.receiveAddressVO?res.data.receiveAddressVO.cityName:''
|
|
|
+ // this.form.receiveAddress.districtName=res.data.receiveAddressVO?res.data.receiveAddressVO.districtName:''
|
|
|
+ // this.form.receiveAddress.receiveAddress=res.data.receiveAddressVO?res.data.receiveAddressVO.receiveAddress:''
|
|
|
+ // this.form.receiveAddress.receiveAreasName=res.data.receiveAddressVO?res.data.receiveAddressVO.receiveAreasName:''
|
|
|
+ this.photograph=res.data.this.reverseReceiveAddress?res.data.this.reverseReceiveAddress.headerImageList:[]
|
|
|
}else{
|
|
|
uni.showToast({
|
|
|
title: res.message,
|
|
@@ -117,9 +118,9 @@
|
|
|
if(res){
|
|
|
this.getArea(res.address)
|
|
|
// this.form.contactAddress=res.address
|
|
|
- this.form.receiveAddress.lat=res.latitude
|
|
|
- this.form.receiveAddress.lng=res.longitude
|
|
|
- this.form.receiveAddress.receiveAreasName= res.address
|
|
|
+ this.reverseReceiveAddress.lat=res.latitude
|
|
|
+ this.reverseReceiveAddress.lng=res.longitude
|
|
|
+ this.reverseReceiveAddress.receiveAreasName= res.address
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -171,35 +172,35 @@
|
|
|
if (index1 == -1) {
|
|
|
index11 = str.indexOf("自治区")
|
|
|
if (index11 != -1) {
|
|
|
- this.form.receiveAddress.provinceName = str.substring(0, index11 + 3)
|
|
|
+ this.reverseReceiveAddress.provinceName = str.substring(0, index11 + 3)
|
|
|
} else {
|
|
|
- this.form.receiveAddress.provinceName= str.substring(0, 0)
|
|
|
+ this.reverseReceiveAddress.provinceName= str.substring(0, 0)
|
|
|
}
|
|
|
} else {
|
|
|
- this.form.receiveAddress.provinceName = str.substring(0, index1 + 1)
|
|
|
+ this.reverseReceiveAddress.provinceName = str.substring(0, index1 + 1)
|
|
|
}
|
|
|
|
|
|
let index2 = str.indexOf("市")
|
|
|
if (index11 == -1) {
|
|
|
- this.form.receiveAddress.cityName = str.substring(index11 + 1, index2 + 1)
|
|
|
+ this.reverseReceiveAddress.cityName = str.substring(index11 + 1, index2 + 1)
|
|
|
} else {
|
|
|
if (index11 == 0) {
|
|
|
- this.form.receiveAddress.cityName = str.substring(index1 + 1, index2 + 1)
|
|
|
+ this.reverseReceiveAddress.cityName = str.substring(index1 + 1, index2 + 1)
|
|
|
} else {
|
|
|
- this.form.receiveAddress.cityName = str.substring(index11 + 3, index2 + 1)
|
|
|
+ this.reverseReceiveAddress.cityName = str.substring(index11 + 3, index2 + 1)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
let index3 = str.lastIndexOf("区")
|
|
|
if (index3 == -1) {
|
|
|
index3 = str.indexOf("县")
|
|
|
- this.form.receiveAddress.districtName = str.substring(index2 + 1, index3 + 1)
|
|
|
+ this.reverseReceiveAddress.districtName = str.substring(index2 + 1, index3 + 1)
|
|
|
} else {
|
|
|
- this.form.receiveAddress.districtName = str.substring(index2 + 1, index3 + 1)
|
|
|
+ this.reverseReceiveAddress.districtName = str.substring(index2 + 1, index3 + 1)
|
|
|
}
|
|
|
// return this.area;
|
|
|
- if(this.form.receiveAddress==''){
|
|
|
- this.form.receiveAddress.provinceName=this.form.receiveAddress.cityName
|
|
|
+ if(this.reverseReceiveAddress.provinceName==''){
|
|
|
+ this.reverseReceiveAddress.provinceName=this.reverseReceiveAddress.cityName
|
|
|
}
|
|
|
},
|
|
|
// 保存
|
|
@@ -212,9 +213,9 @@
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
- const params=Object.assign(this.form,{sourceTypeReserve:'rider'})
|
|
|
+ const params=Object.assign(this.form,{sourceTypeReserve:'rider'},{reverseReceiveAddress:this.reverseReceiveAddress})
|
|
|
if(this.photograph.length>0){
|
|
|
- params.receiveAddress.headerImageList=this.photograph
|
|
|
+ params.reverseReceiveAddress.headerImageList=this.photograph
|
|
|
}
|
|
|
if(this.itemId){
|
|
|
params.id=this.itemId
|