|
|
@ -316,6 +316,8 @@ |
|
|
tab1Checked: 'daiqu', |
|
|
tab1Checked: 'daiqu', |
|
|
menuButtonInfo: {}, |
|
|
menuButtonInfo: {}, |
|
|
isArea: false, |
|
|
isArea: false, |
|
|
|
|
|
latitude: 39.909, // 默认纬度,可以设为用户当前位置或配送员位置 |
|
|
|
|
|
longitude: 116.39742, // 默认经度 |
|
|
productData:{}, |
|
|
productData:{}, |
|
|
searchForm:{ |
|
|
searchForm:{ |
|
|
status: 1, |
|
|
status: 1, |
|
|
@ -400,13 +402,6 @@ |
|
|
this.latitude = res.latitude; |
|
|
this.latitude = res.latitude; |
|
|
this.longitude = res.longitude; |
|
|
this.longitude = res.longitude; |
|
|
|
|
|
|
|
|
that.tui.request("/worker/admin/edit", "POST", { |
|
|
|
|
|
workerId:uni.getStorageSync('worker').workerId, |
|
|
|
|
|
region:JSON.parse(uni.getStorageSync('area')).id, |
|
|
|
|
|
geolocation:this.latitude + ',' + this.longitude |
|
|
|
|
|
}, false, false).then((res) => { |
|
|
|
|
|
|
|
|
|
|
|
}).catch((res) => {}) |
|
|
|
|
|
// // 将用户位置添加到标记点 |
|
|
// // 将用户位置添加到标记点 |
|
|
// this.markers.push({ |
|
|
// this.markers.push({ |
|
|
// id: 0, |
|
|
// id: 0, |
|
|
@ -657,6 +652,7 @@ |
|
|
this.isArea = !this.isArea |
|
|
this.isArea = !this.isArea |
|
|
}, |
|
|
}, |
|
|
changeStatus(index,item,status){ |
|
|
changeStatus(index,item,status){ |
|
|
|
|
|
let regionId = JSON.parse(uni.getStorageSync('area')).id |
|
|
let url = '' |
|
|
let url = '' |
|
|
if(status == 2){ |
|
|
if(status == 2){ |
|
|
url = "/mall/delivery/pickup" |
|
|
url = "/mall/delivery/pickup" |
|
|
@ -666,9 +662,9 @@ |
|
|
url = "/mall/delivery/arriveShop" |
|
|
url = "/mall/delivery/arriveShop" |
|
|
} |
|
|
} |
|
|
let that = this |
|
|
let that = this |
|
|
that.tui.request(url, "POST", {deliveryId:item.id,workerId:item.workerId}, false, true).then((res) => { |
|
|
|
|
|
if (res.code == 200) { |
|
|
|
|
|
that.getUserLocation() |
|
|
that.getUserLocation() |
|
|
|
|
|
that.tui.request(url, "POST", {regionId:regionId,deliveryId:item.id,workerId:item.workerId,geolocation:that.latitude + ',' + that.longitude}, false, true).then((res) => { |
|
|
|
|
|
if (res.code == 200) { |
|
|
if(status == 2 || status == 3){ |
|
|
if(status == 2 || status == 3){ |
|
|
that.pageData.splice(index, 1) |
|
|
that.pageData.splice(index, 1) |
|
|
}else{ |
|
|
}else{ |
|
|
|