From 1d3acbd2992cac0123911f0ffc13a71910ae484b Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期六, 19 七月 2025 16:14:12 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 small-program/utils/http.interceptor.js                   |    2 
 small-program/pages/packaging-worker/packaging-worker.vue |    2 
 small-program/pages/demand-hall/demand-hall.vue           |   31 ++++++----
 small-program/pages/sorting/sorting.vue                   |    2 
 small-program/pages/using-workers/using-workers.vue       |    2 
 small-program/pages/index/index.vue                       |   29 ++++++---
 small-program/pages/order-details/order-details.vue       |    4 
 small-program/pages/freight/freight.vue                   |   78 ++++++++++++++++++-------
 8 files changed, 101 insertions(+), 49 deletions(-)

diff --git a/small-program/pages/demand-hall/demand-hall.vue b/small-program/pages/demand-hall/demand-hall.vue
index 52e4b0d..793717b 100644
--- a/small-program/pages/demand-hall/demand-hall.vue
+++ b/small-program/pages/demand-hall/demand-hall.vue
@@ -11,7 +11,7 @@
 		<view class="index-wu" v-if="!isLogin">
 			<image src="/static/icon/default_login@2x.png" mode="widthFix"></image>
 			<text>鎮ㄨ繕娌℃湁鐧诲綍锛岃鐧诲綍鍚庢煡鐪嬭鍗�</text>
-			<button>鐧诲綍</button>
+			<button @click="toLogin">鐧诲綍</button>
 		</view>
 		
 		<!-- 宸茬櫥闄� -->
@@ -50,7 +50,7 @@
 						<view class="index-list-item-head-r" v-if="item.status === 2">宸叉帴鍗�</view>
 						<view class="index-list-item-head-r" v-if="item.status === 3">杩涜涓�</view>
 						<view class="index-list-item-head-r" v-if="item.status === 2 && item.isUpdate === 1">宸蹭慨鏀癸紝寰呮帴鍗曟柟纭</view>
-						<view class="index-list-item-head-r hui" v-if="item.status === 4">宸插畬鎴�</view>
+						<view class="index-list-item-head-r hui" v-if="item.status === 4 && item.commentStatus !== 0">宸插畬鎴�</view>
 						<view class="index-list-item-head-r hui" v-if="item.status === 99">宸插彇娑�</view>
 						<view class="index-list-item-head-r" v-if="item.status === 4 && item.commentStatus === 0">寰呰瘎浠�</view>
 					</view>
@@ -98,7 +98,7 @@
 							<view class="eidt-close" v-if="[0,1,2].includes(item.status)" @click.stop="orderId = item.id, show = true">鍙栨秷璁㈠崟</view>
 							<view class="eidt-phone" v-if="[2].includes(item.status)">鑱旂郴甯堝倕</view>
 							<view class="eidt-phone" v-if="item.status === 4 && item.commentStatus === 0">璇勪环璁㈠崟</view>
-							<view class="eidt-btn" v-if="[0,1,2].includes(item.status)" @click.stop="jumpEdit(item)">淇敼璁㈠崟</view>
+							<view class="eidt-btn" v-if="[0,1,2].includes(item.status) && item.type !== 2" @click.stop="jumpEdit(item)">淇敼璁㈠崟</view>
 							<view class="eidt-btn" v-if="(item.type === 2 && item.status === 0) ||  (item.type === 2 && item.status === 3)" @click.stop="jumpEdit(item)">缁х画鏀粯</view>
 							<view class="eidt-btn" v-if="item.status === 2" @click.stop="startJobs(item.id)">寮�濮嬩綔涓�</view>
 							<view class="eidt-btn" v-if="item.status === 3" @click.stop="jumpDesc(item)">瀹屾垚骞舵敮浠�</view>
@@ -206,19 +206,21 @@
 		onShow(options) {
 			this.typeViewId = 0
 			if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){
+				console.log('宸茬櫥闄�')
 				this.isLogin = true
+				if (!this.isOnce) {
+					this.commentStatus = ''
+					this.orderList = []
+					this.next = true
+					this.page = 1
+					this.getOrderList()
+				}
+			} else {
+				this.isLogin = false
+				console.log('鏈櫥闄�')
 			}
 			if (this.userInfo && this.userInfo.useIdentity == 1) {
 				this.typeViewId = 1
-			} else {
-				this.typeViewId = 0
-			}
-			if (!this.isOnce) {
-				this.commentStatus = ''
-				this.orderList = []
-				this.next = true
-				this.page = 1
-				this.getOrderList()
 			}
 		},
 		data() {
@@ -270,6 +272,11 @@
 			this.getOrderList()
 		},
 		methods: {
+			toLogin() {
+				uni.navigateTo({
+					url: '/pages/login/login'
+				})
+			},
 			startJobs(orderId) {
 				this.$u.api.begin({ orderId })
 					.then(res => {
diff --git a/small-program/pages/freight/freight.vue b/small-program/pages/freight/freight.vue
index b6c615e..d915dee 100644
--- a/small-program/pages/freight/freight.vue
+++ b/small-program/pages/freight/freight.vue
@@ -357,29 +357,63 @@
 				if (!this.form.linkPhone) {
 					return uni.showToast({ title: '璇疯緭鍏ヨ仈绯荤數璇�', icon: 'none' })
 				}
-				this.$u.api.release({ 
-					...this.form,
-					price: Number(this.form.price) * 100,
-					wayInfoDTOList: [
-						{
-							lat: this.form.lat,
-							lgt: this.form.lgt,
-							location: this.form.location
-						},
-						...this.form.wayInfoDTOList,
-						{
-							lat: this.form.latEnd,
-							lgt: this.form.lgtEnd,
-							location: this.form.locationEnd
+				if (!this.form.id) {
+					this.$u.api.release({
+						...this.form,
+						price: Number(this.form.price) * 100,
+						wayInfoDTOList: [
+							{
+								lat: this.form.lat,
+								lgt: this.form.lgt,
+								location: this.form.location
+							},
+							...this.form.wayInfoDTOList,
+							{
+								lat: this.form.latEnd,
+								lgt: this.form.lgtEnd,
+								location: this.form.locationEnd
+							}
+						]
+					}).then(res => {
+						if (res.code == 200) {
+							uni.navigateTo({
+								url: `/pages/success/success?orderId=${res.data.id}`
+							})
 						}
-					]
-				}).then(res => {
-					if (res.code == 200) {
-						uni.navigateTo({
-							url: `/pages/success/success?orderId=${res.data.id}`
-						})
-					}
-				})
+					})
+				} else {
+					this.$u.api.updateOrder({
+						...this.form,
+						price: Number(this.form.price) * 100,
+						wayInfoDTOList: [
+							{
+								lat: this.form.lat,
+								lgt: this.form.lgt,
+								location: this.form.location
+							},
+							...this.form.wayInfoDTOList,
+							{
+								lat: this.form.latEnd,
+								lgt: this.form.lgtEnd,
+								location: this.form.locationEnd
+							}
+						]
+					}).then(res => {
+						if (res.code == 200) {
+							uni.showToast({
+								title: '缂栬緫鎴愬姛',
+								icon: 'success',
+								mask: true,
+								duration: 2000
+							})
+							setTimeout(() => {
+								uni.navigateBack({ delta: 1 });
+								// uni.$emit('refresh')
+							}, 1500)
+							
+						}
+					})
+				}
 			},
 			uploadImg() {
 				var that = this;
diff --git a/small-program/pages/index/index.vue b/small-program/pages/index/index.vue
index 1c2ed91..7d73195 100644
--- a/small-program/pages/index/index.vue
+++ b/small-program/pages/index/index.vue
@@ -392,23 +392,32 @@
 		},
 		async onLoad() {
 			await this.$onLaunched;
-			this.getCategoryLists()
-			this.getOrderList()
+			if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') {
+				this.getOrderList()
+				this.getCategoryLists()
+			}
 			this.form.linkPhone = this.userInfo.telephone
 		},
 		onShow(options) {
 			this.typeViewId = 0
-			if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){
+			if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') {
+				console.log('宸茬櫥闄�')
 				this.isLogin = true
+				
+				if (!this.isOnce && this.userInfo.useIdentity == 1) {
+					this.page = 1
+					this.next = true
+					this.orderList = []
+					this.getOrderList()
+				}
+				
+			} else {
+				this.isLogin = false
+				console.log('鏈櫥闄�')
 			}
+			
 			if (this.userInfo && this.userInfo.useIdentity == 1) {
 				this.typeViewId = 1
-			}
-			if (!this.isOnce && this.userInfo.useIdentity == 1) {
-				this.page = 1
-				this.next = true
-				this.orderList = []
-				this.getOrderList()
 			}
 		},
 		watch: {
@@ -421,7 +430,7 @@
 					this.form.longitude = ''
 					this.form.location = ''
 					this.form.locationEnd = ''
-					this.form.wayInfoDTOList = ''
+					this.form.wayInfoDTOList = []
 					this.form.workType = ''
 					this.form.days = ''
 					this.form.locationRemark = ''
diff --git a/small-program/pages/order-details/order-details.vue b/small-program/pages/order-details/order-details.vue
index 2f981b1..ea5d076 100644
--- a/small-program/pages/order-details/order-details.vue
+++ b/small-program/pages/order-details/order-details.vue
@@ -163,8 +163,8 @@
 				</view>
 			</view>
 		</view>
-		<view style="width: 100%; height: calc(108rpx + env(safe-area-inset-bottom));" v-if="![4, 99].includes(info.status)"></view>
-		<view class="order-footer" v-if="![4, 99].includes(info.status)">
+		<view style="width: 100%; height: calc(108rpx + env(safe-area-inset-bottom));" v-if="![99].includes(info.status)"></view>
+		<view class="order-footer" v-if="![99].includes(info.status)">
 			<view class="order-footer-btn"> 
 				<view class="order-footer-btn-a" @click="show = true" v-if="userInfo.id === info.acceptMemberId && info.status ===2">鍙栨秷璁㈠崟</view>
 				<view class="order-footer-btn-a" @click="show = true" v-if="userInfo.id === info.releaseMemberId && (info.status ===0 ||  info.status ===1|| info.status ===2)">鍙栨秷璁㈠崟</view>
diff --git a/small-program/pages/packaging-worker/packaging-worker.vue b/small-program/pages/packaging-worker/packaging-worker.vue
index deb0d78..7a052b3 100644
--- a/small-program/pages/packaging-worker/packaging-worker.vue
+++ b/small-program/pages/packaging-worker/packaging-worker.vue
@@ -269,7 +269,7 @@
 									uni.showToast({ title: '缂栬緫鎴愬姛', icon: 'success', mask: true, duration: 2000 })
 									setTimeout(() => {
 										uni.navigateBack({ delta: 1 });
-										uni.$emit('refresh')
+										// uni.$emit('refresh')
 									}, 1500)
 								}
 							}
diff --git a/small-program/pages/sorting/sorting.vue b/small-program/pages/sorting/sorting.vue
index 99002d5..f9d068f 100644
--- a/small-program/pages/sorting/sorting.vue
+++ b/small-program/pages/sorting/sorting.vue
@@ -257,7 +257,7 @@
 								uni.showToast({ title: '缂栬緫鎴愬姛', icon: 'success', mask: true, duration: 2000 })
 								setTimeout(() => {
 									uni.navigateBack({ delta: 1 });
-									uni.$emit('refresh')
+									// uni.$emit('refresh')
 								}, 1500)
 							}
 						})
diff --git a/small-program/pages/using-workers/using-workers.vue b/small-program/pages/using-workers/using-workers.vue
index 4b4b942..e073df0 100644
--- a/small-program/pages/using-workers/using-workers.vue
+++ b/small-program/pages/using-workers/using-workers.vue
@@ -256,7 +256,7 @@
 								})
 								setTimeout(() => {
 									uni.navigateBack({ delta: 1 });
-									uni.$emit('refresh')
+									// uni.$emit('refresh')
 								}, 1500)
 								
 							}
diff --git a/small-program/utils/http.interceptor.js b/small-program/utils/http.interceptor.js
index 945ff92..47a309b 100644
--- a/small-program/utils/http.interceptor.js
+++ b/small-program/utils/http.interceptor.js
@@ -2,6 +2,7 @@
 	// 璇锋眰鎷︽埅鍣�
 	uni.$u.http.interceptors.request.use((config) => {
 		const Headtoken = vm.$store.state.token
+		uni.showLoading({ title: '鍔犺浇涓�' });
 		// 鍒ゆ柇鏈夋棤token锛屾湁鍒欏姞鍏ヨ姹傚ご涓�
 		if (Headtoken) {
 			config.header['token'] = Headtoken;
@@ -13,6 +14,7 @@
 	
 	// 鍝嶅簲鎷︽埅鍣�
 	uni.$u.http.interceptors.response.use((response) => {
+		uni.hideLoading();
 		// console.log(response.data)
 		if (response.data.code === 5113) {
 			uni.switchTab({

--
Gitblit v1.9.3