From 51788eaaaf643433ca466f582fbae0359f05d0ac Mon Sep 17 00:00:00 2001 From: tianyi <13521030702@163.com> Date: Mon, 11 May 2026 10:13:55 +0800 Subject: [PATCH] 1 --- components/tab-bar/delivery.vue | 80 +++++++++++++++------------------ 1 file changed, 35 insertions(+), 45 deletions(-) diff --git a/components/tab-bar/delivery.vue b/components/tab-bar/delivery.vue index 8480520..0c5f67c 100644 --- a/components/tab-bar/delivery.vue +++ b/components/tab-bar/delivery.vue @@ -36,15 +36,15 @@ - + 饭团 - + 快递 - + 跑腿 @@ -84,11 +84,11 @@ + style="background: rgba(247, 248, 248, 0.6);height: 80rpx;line-height: 80rpx;font-weight: 500;padding: 0 20rpx;border-radius: 20rpx;"> 备注:{{item.remark}} + style="background: rgba(247, 248, 248, 0.6);line-height: 80rpx;font-weight: 700;padding: 0 20rpx;border-radius: 20rpx;margin-top: 20rpx;color: #777;"> {{item.allCount != null ? item.allCount : 0}}件 @@ -395,28 +395,7 @@ // 获取用户位置 getUserLocation() { let that = this; - uni.getLocation({ - type: 'gcj02', // 返回国测局坐标,用于微信小程序地图组件 - success: (res) => { - console.log('位置', res) - this.latitude = res.latitude; - this.longitude = res.longitude; - - // // 将用户位置添加到标记点 - // this.markers.push({ - // id: 0, - // latitude: res.latitude, - // longitude: res.longitude, - // title: '我的位置', - // iconPath: '/static/images/tabbar/fabu1.png', // 用户位置图标 - // width: 30, - // height: 30 - // }); - }, - fail: (err) => { - console.log('获取位置失败', err); - } - }); + }, onReachPage(){ console.log("11111") @@ -662,24 +641,35 @@ url = "/mall/delivery/arriveShop" } let that = this - 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){ - that.pageData.splice(index, 1) - }else{ - that.pageData[index].arriveTime = "qq" - } - that.tui.toast(res.message,200); - /* that.searchForm.pageNum = 1 - that.getDelivery() */ - that.$forceUpdate(); - } else { - that.tui.toast(res.message,200); - return; + uni.getLocation({ + type: 'gcj02', // 返回国测局坐标,用于微信小程序地图组件 + success: (res) => { + console.log('位置', res) + that.latitude = res.latitude; + that.longitude = res.longitude; + + 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){ + that.pageData.splice(index, 1) + }else{ + that.pageData[index].arriveTime = "qq" + } + that.tui.toast(res.message,200); + /* that.searchForm.pageNum = 1 + that.getDelivery() */ + that.$forceUpdate(); + } else { + that.tui.toast(res.message,200); + return; + } + uni.hideLoading(); + }).catch((res) => {}); + }, + fail: (err) => { + console.log('获取位置失败', err); } - uni.hideLoading(); - }).catch((res) => {}); + }); }, checkTab1(type) { this.tab1Checked = type @@ -840,7 +830,7 @@ top: -20rpx; right: 20rpx; text-align: center; - line-height: 90rpx; + line-height: 140rpx; font-weight: 900; font-size: 24rpx; }