diff --git a/pages/index/index.vue b/pages/index/index.vue index c02c092..3298c70 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -685,18 +685,20 @@ this.$refs.productPopup.open() }, getOrder(item,index){ + let that = this + that.getUserLocation() let data = { groupId:item.groupId ? item.groupId : '', deliveryId:item.id, workerId:uni.getStorageSync('worker') ? uni.getStorageSync('worker').workerId : '', workerPhone:uni.getStorageSync('worker') ? uni.getStorageSync('worker').mobile : '', 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) => { that.loadStatus = 'nomore'; - that.getUserLocation(); if (res.code == 200) { if(!uni.getStorageSync('worker') && res.result != null){ uni.setStorageSync('worker',res.result) @@ -928,13 +930,6 @@ this.latitude = res.latitude; 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({ // id: 0,