From b806c4ad52a661a1e5f0695650ec1a7e42f01633 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 20 五月 2026 23:08:48 +0800
Subject: [PATCH] 提交

---
 app/pages/order-detail/order-detail.vue |   86 +++++++++++++++++++++++-------------------
 1 files changed, 47 insertions(+), 39 deletions(-)

diff --git a/app/pages/order-detail/order-detail.vue b/app/pages/order-detail/order-detail.vue
index 5e481af..b5dd599 100644
--- a/app/pages/order-detail/order-detail.vue
+++ b/app/pages/order-detail/order-detail.vue
@@ -119,7 +119,7 @@
 							<image class="order-detail-page__qrcode-image" :src="'https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=' + orderDetail.driverVerifyCode" mode="aspectFit"></image>
 						</view>
 						<text class="order-detail-page__qrcode-value">{{ orderDetail.driverVerifyCode }}</text>
-						<text class="order-detail-page__qrcode-label">鍙栬揣鐮�</text>
+						<text class="order-detail-page__qrcode-label">{{ orderDetail.status === 3 ? '鍙栬揣鐮�' : '瀛樹欢鐮�' }}</text>
 					</view>
 				</view>
 
@@ -451,7 +451,6 @@
 			this.topFixedHeight = uni.upx2px(500 + 92)
 			if (this.orderId) {
 				this.getOrderDetail()
-				this.initOperationRadius()
 			}
 		},
 
@@ -466,34 +465,45 @@
 			handleBack() {
 				uni.navigateBack({ delta: 1 });
 			},
-
 			initOperationRadius() {
-				uni.getLocation({
-					type: 'gcj02',
-					success: (res) => {
-						this.$u.api.checkDriverOperationRadius({
-							lat: res.latitude,
-							lng: res.longitude,
-							orderId: this.orderId
-						}).then(res => {
-							if (res.code === 200) {
-								this.isWithinOperationRadius = res.data
-								if (!this.isWithinOperationRadius) {
-									uni.showToast({
-										title: '鎮ㄥ綋鍓嶄綅缃笌鏀惰揣鍦板潃璺濈瓒呭嚭鑼冨洿锛岃鍦ㄥ湴鍧�闄勮繎閲嶆柊鎷嶇収',
-										icon: 'none'
-									})
+				console.log('initOperationRadius')
+				return new Promise((resolve) => {
+					uni.getLocation({
+						type: 'gcj02',
+						success: (res) => {
+							this.$u.api.checkDriverOperationRadius({
+								lat: res.latitude,
+								lng: res.longitude,
+								orderId: this.orderId
+							}).then(res => {
+								if (res.code === 200) {
+									this.isWithinOperationRadius = res.data
+									console.log(res.data)
+									if (!this.isWithinOperationRadius) {
+										uni.showToast({
+											title: '鎮ㄥ綋鍓嶄綅缃笌鏀惰揣鍦板潃璺濈瓒呭嚭鑼冨洿锛岃鍦ㄥ湴鍧�闄勮繎閲嶆柊鎷嶇収',
+											icon: 'none'
+										})
+										resolve(false)
+									} else {
+										resolve(true)
+									}
+								} else {
+									resolve(false)
 								}
-							}
-						})
-					},
-					fail: () => {
-						this.isWithinOperationRadius = false
-						uni.showToast({
-							title: '鎮ㄥ綋鍓嶄綅缃潈闄愭病鏈夊紑鍚紝璇峰厛寮�鍚悗鍐嶆潵鎿嶄綔',
-							icon: 'none'
-						})
-					}
+							}).catch(() => {
+								resolve(false)
+							})
+						},
+						fail: () => {
+							this.isWithinOperationRadius = false
+							uni.showToast({
+								title: '鎮ㄥ綋鍓嶄綅缃潈闄愭病鏈夊紑鍚紝璇峰厛寮�鍚悗鍐嶆潵鎿嶄綔',
+								icon: 'none'
+							})
+							resolve(false)
+						}
+					})
 				})
 			},
 
@@ -634,17 +644,14 @@
 				}
 
 				if (action === 'pickup' || action === 'deliver') {
-					if (!this.isWithinOperationRadius) {
-						uni.showToast({
-							title: '鎮ㄥ綋鍓嶄綅缃笌鏀惰揣鍦板潃璺濈瓒呭嚭鑼冨洿锛岃鍦ㄥ湴鍧�闄勮繎閲嶆柊鎷嶇収',
-							icon: 'none'
-						})
-						return
-					}
-					this.uploadedPhotos = []
-					this.photoRemark = ''
-					this.photoPopupMode = action
-					this.showPhotoPopup = true
+					this.initOperationRadius().then((isValid) => {
+						console.log(isValid)
+						if (!isValid) return
+						this.uploadedPhotos = []
+						this.photoRemark = ''
+						this.photoPopupMode = action
+						this.showPhotoPopup = true
+					})
 					return
 				}
 
@@ -682,6 +689,7 @@
 					if (res.code === 200) {
 						uni.showToast({ title: '鎺ュ崟鎴愬姛', icon: 'success' })
 						this.getOrderDetail()
+						uni.$emit('jiedanSuccess')
 						setTimeout(() => {
 							uni.navigateBack()
 						}, 1500)

--
Gitblit v1.9.3