From 41ac949ba5a6f3fe5b94277df1f1982c47da7b65 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Wed, 6 May 2026 11:35:45 +0800 Subject: [PATCH] 1 --- components/tab-bar/delivery.vue | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/components/tab-bar/delivery.vue b/components/tab-bar/delivery.vue index ad293ae..8480520 100644 --- a/components/tab-bar/delivery.vue +++ b/components/tab-bar/delivery.vue @@ -316,6 +316,8 @@ tab1Checked: 'daiqu', menuButtonInfo: {}, isArea: false, + latitude: 39.909, // 默认纬度,可以设为用户当前位置或配送员位置 + longitude: 116.39742, // 默认经度 productData:{}, searchForm:{ status: 1, @@ -400,13 +402,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, @@ -657,6 +652,7 @@ this.isArea = !this.isArea }, changeStatus(index,item,status){ + let regionId = JSON.parse(uni.getStorageSync('area')).id let url = '' if(status == 2){ url = "/mall/delivery/pickup" @@ -666,9 +662,9 @@ url = "/mall/delivery/arriveShop" } let that = this - that.tui.request(url, "POST", {deliveryId:item.id,workerId:item.workerId}, false, true).then((res) => { + 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) { - that.getUserLocation() if(status == 2 || status == 3){ that.pageData.splice(index, 1) }else{