From 86baa8ff948d2e79588e0dd7efa16f6b8ac3b157 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 06 十二月 2024 15:29:15 +0800
Subject: [PATCH] ll

---
 h5/pages/driver/taskDetail.vue |   75 ++++++++++++++++++++++++++++---------
 1 files changed, 56 insertions(+), 19 deletions(-)

diff --git a/h5/pages/driver/taskDetail.vue b/h5/pages/driver/taskDetail.vue
index 2b56631..e2aab9b 100644
--- a/h5/pages/driver/taskDetail.vue
+++ b/h5/pages/driver/taskDetail.vue
@@ -181,10 +181,10 @@
 					status: '0'
 				},
 				jobId: '',
-				// lat: '',
-				// lnt: '',
-				lat: '31.783205',
-				lnt: '117.262635',
+				lat: '',
+				lnt: '',
+				// lat: '31.783205',
+				// lnt: '117.262635',
 				nowTime: '',
 				wmsInfo: {},
 				signDistance: uni.getStorageSync('driverGuide').signDistance,
@@ -193,12 +193,23 @@
 		},
 		onLoad(option) {
 			this.jobId = option.id
-			// if(option.status && option.status == '1'){
-			// 	this.getLocation()
-			// }else{
-			// 	this.getDetail()
-			// }
-			this.getDetail()
+			if (option.status && option.status == '1') {
+				// wx.config({
+				// 	debug: false, // 寮�鍚皟璇曟ā寮�,璋冪敤鐨勬墍鏈塧pi鐨勮繑鍥炲�间細鍦ㄥ鎴风alert鍑烘潵锛岃嫢瑕佹煡鐪嬩紶鍏ョ殑鍙傛暟锛屽彲浠ュ湪pc绔墦寮�锛屽弬鏁颁俊鎭細閫氳繃log鎵撳嚭锛屼粎鍦╬c绔椂鎵嶄細鎵撳嵃銆�
+				// 	appId: 'wx173e6caf5abc718a', // 蹇呭~锛屽叕浼楀彿鐨勫敮涓�鏍囪瘑
+				// 	timestamp: timeStamp, // 蹇呭~锛岀敓鎴愮鍚嶇殑鏃堕棿鎴�
+				// 	nonceStr: nonceStr, // 蹇呭~锛岀敓鎴愮鍚嶇殑闅忔満涓�
+				// 	signature: Sign, // 蹇呭~锛岀鍚�
+				// 	jsApiList: [
+				// 		'getLocation',
+				// 		'openLocation'
+				// 	] // 蹇呭~锛岄渶瑕佷娇鐢ㄧ殑JS鎺ュ彛鍒楄〃
+				// })
+				this.getLocation()
+			} else {
+				this.getDetail()
+			}
+			// this.getDetail()
 			setInterval(() => {
 				this.nowTime = dayjs().format('HH:mm:ss')
 			})
@@ -254,6 +265,22 @@
 				const {
 					jobId
 				} = this
+				// wx.ready(() => {
+				// 	wx.getLocation({
+				// 		type: "gcj02", // gcj02锛堢伀鏄熷潗鏍囷級锛寃gs84锛圙PS鍧愭爣锛�
+				// 		success: (res) => {
+				// 			this.lat = res.latitude
+				// 			this.lnt = res.longitude
+				// 			this.getDetail()
+				// 		},
+				// 		fail: (err) => {
+				// 			console.error("鑾峰彇瀹氫綅澶辫触锛�", err);
+				// 		},
+				// 		cancel: () => {
+				// 			console.warn("鐢ㄦ埛鎷掔粷鎺堟潈鑾峰彇鍦扮悊浣嶇疆");
+				// 		},
+				// 	});
+				// });
 				uni.getLocation({
 					type: 'wgs84',
 					success: (res) => {
@@ -262,7 +289,7 @@
 						this.getDetail()
 					},
 					fail: (err) => {
-						this.showToast('鑾峰彇瀹氫綅澶辫触')
+						this.showToast('鑾峰彇瀹氫綅澶辫触', err)
 					}
 				})
 			},
@@ -438,11 +465,12 @@
 		}
 	}
 
-.detail_modal {
-		height: calc( 100vh - 88rpx );
+	.detail_modal {
+		height: calc(100vh - 88rpx);
 		padding: 36rpx 30rpx;
 		border-radius: 12rpx;
 		box-shadow: 0 0 6rpx rgba(0, 0, 0, 0.5);
+
 		.modal_title {
 			font-weight: 600;
 			font-size: 32rpx;
@@ -451,37 +479,46 @@
 			text-align: center;
 			margin-bottom: 36rpx;
 		}
-		.contract_wrap{
-			height: calc( 100% - 400rpx );
+
+		.contract_wrap {
+			height: calc(100% - 400rpx);
 			overflow-y: auto;
 		}
+
 		.contract_list {
 			border-top: 1rpx solid #E5E5E5;
 			margin-bottom: 30rpx;
 			padding-top: 30rpx;
-			&:nth-last-child(1){
+
+			&:nth-last-child(1) {
 				margin-bottom: 0;
 			}
+
 			.list {
 				background: #f7f7f7;
 				border-radius: 8rpx;
 				padding: 20rpx;
-				.item{
+
+				.item {
 					border-bottom: 1rpx solid #e5e5e5;
 					padding-bottom: 20rpx;
 					margin-bottom: 20rpx;
-					&:nth-last-child(1){
+
+					&:nth-last-child(1) {
 						border: none;
 						padding-bottom: 0;
 						margin-bottom: 0;
 					}
 				}
+
 				.line {
 					display: flex;
 					margin-bottom: 20rpx;
-					&:nth-last-child(1){
+
+					&:nth-last-child(1) {
 						margin-bottom: 0rpx;
 					}
+
 					.label {
 						color: #666666;
 						width: 92rpx;

--
Gitblit v1.9.3