wangfukang 1 month ago
parent
commit
5c153acba8
  1. 15
      pages/index/index.vue

15
pages/index/index.vue

@ -685,18 +685,20 @@
this.$refs.productPopup.open() this.$refs.productPopup.open()
}, },
getOrder(item,index){ getOrder(item,index){
let that = this
that.getUserLocation()
let data = { let data = {
groupId:item.groupId ? item.groupId : '', groupId:item.groupId ? item.groupId : '',
deliveryId:item.id, deliveryId:item.id,
workerId:uni.getStorageSync('worker') ? uni.getStorageSync('worker').workerId : '', workerId:uni.getStorageSync('worker') ? uni.getStorageSync('worker').workerId : '',
workerPhone:uni.getStorageSync('worker') ? uni.getStorageSync('worker').mobile : '', workerPhone:uni.getStorageSync('worker') ? uni.getStorageSync('worker').mobile : '',
workerName:uni.getStorageSync('worker') ? uni.getStorageSync('worker').workerName : '', workerName:uni.getStorageSync('worker') ? uni.getStorageSync('worker').workerName : '',
regionId:JSON.parse(uni.getStorageSync('area')).id regionId:JSON.parse(uni.getStorageSync('area')).id,
geolocation:that.latitude + ',' + that.longitude
} }
let that = this
this.tui.request("/mall/delivery/accept", "POST",data, false, true).then((res) => { this.tui.request("/mall/delivery/accept", "POST",data, false, true).then((res) => {
that.loadStatus = 'nomore'; that.loadStatus = 'nomore';
that.getUserLocation();
if (res.code == 200) { if (res.code == 200) {
if(!uni.getStorageSync('worker') && res.result != null){ if(!uni.getStorageSync('worker') && res.result != null){
uni.setStorageSync('worker',res.result) uni.setStorageSync('worker',res.result)
@ -928,13 +930,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,

Loading…
Cancel
Save