From 3f9032e92fdd383bfefc87a0bec9b242e1223851 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 09 六月 2026 17:08:44 +0800
Subject: [PATCH] 改bug

---
 app/pages/order/order.vue |   34 +++++++++++++++++++++-------------
 1 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/app/pages/order/order.vue b/app/pages/order/order.vue
index bbd6fbb..ca8afcc 100644
--- a/app/pages/order/order.vue
+++ b/app/pages/order/order.vue
@@ -20,7 +20,7 @@
 			</view>
 		</view>
 
-		<scroll-view class="order-page__body" scroll-y :style="bodyStyle">
+		<scroll-view class="order-page__body" scroll-y :style="bodyStyle" @scrolltolower="handleScrollToLower">
 			<view class="order-page__list">
 				<view v-for="(item, index) in orders" :key="item.id" class="order-card" @click="goToOrderDetail(item, index)">
 					<view class="order-card__head">
@@ -152,6 +152,8 @@
 </template>
 
 <script>
+	import { chooseImageWithNotice, getLocationWithNotice } from '@/utils/utils'
+
 	export default {
 		data() {
 			return {
@@ -224,11 +226,6 @@
 		onShow() {
 			this.getActiveOrderCount()
 		},
-		onReachBottom() {
-			if (!this.hasMore || this.loading) return
-			this.page++
-			this.getOrderList()
-		},
 		watch: {
 			activeTab() {
 				this.page = 1
@@ -238,6 +235,11 @@
 			}
 		},
 		methods: {
+			handleScrollToLower() {
+				if (!this.hasMore || this.loading) return
+				this.page++
+				this.getOrderList()
+			},
 			searchOrder() {
 				this.page = 1
 				this.hasMore = true
@@ -291,6 +293,10 @@
 			},
 			getOrderList() {
 				if (this.loading) return
+				console.log({
+					status: this.activeTab,
+					keyword: this.searchKeyword
+				})
 				this.loading = true
 				this.$u.api.orderPage({
 					capacity: 10,
@@ -367,7 +373,7 @@
 				this.checkOperationRadius(item.id, 'deliver')
 			},
 			checkOperationRadius(orderId, mode) {
-				uni.getLocation({
+				getLocationWithNotice({
 					type: 'gcj02',
 					success: (res) => {
 						this.$u.api.checkDriverOperationRadius({
@@ -394,11 +400,11 @@
 					},
 					fail: () => {
 						uni.showToast({
-							title: '鏃犳硶鑾峰彇鎮ㄧ殑浣嶇疆淇℃伅',
+							title: '鏃犳硶鑾峰彇鎮ㄧ殑浣嶇疆淇℃伅锛岃鍓嶅線璁剧疆寮�鍚畾浣嶆潈闄�',
 							icon: 'none'
 						})
 					}
-				})
+				}).catch(() => {})
 			},
 			closePhotoPopup() {
 				this.showPhotoPopup = false
@@ -408,24 +414,24 @@
 					uni.showToast({ title: '鏈�澶氫笂浼�3寮犵収鐗�', icon: 'none' })
 					return
 				}
-				uni.chooseImage({
+				chooseImageWithNotice({
 					count: 3 - this.uploadedPhotos.length,
 					sourceType: ['camera', 'album'],
 					success: (res) => {
 						this.uploadedPhotos = [...this.uploadedPhotos, ...res.tempFilePaths]
 					}
-				})
+				}).catch(() => {})
 			},
 			deletePhoto(index) {
 				this.uploadedPhotos.splice(index, 1)
 			},
-			submitPhotoPopup() {
+				submitPhotoPopup() {
 				if (this.uploadedPhotos.length === 0) {
 					uni.showToast({ title: '璇蜂笂浼犵収鐗�', icon: 'none' })
 					return
 				}
 				uni.showLoading({ title: '涓婁紶涓�...' })
-				uni.getLocation({
+				getLocationWithNotice({
 					type: 'gcj02',
 					success: (locationRes) => {
 						this.doUploadPhotos(locationRes.latitude, locationRes.longitude)
@@ -433,6 +439,8 @@
 					fail: () => {
 						this.doUploadPhotos(null, null)
 					}
+				}).catch(() => {
+					this.doUploadPhotos(null, null)
 				})
 			},
 

--
Gitblit v1.9.3