From 72935b2a35765bcc3622561bb06f2eccd64caf83 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期二, 16 五月 2023 16:49:00 +0800
Subject: [PATCH] 修改上传图片时页面跳转问题

---
 pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue b/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue
index 4c20882..008c53a 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue
@@ -21,19 +21,17 @@
 import { todayDate } from '@/utils/util.js';
 export default {
 	onLoad(params) {
-		if (params.orderPlanId && params.coalStatus) {
-			this.punchTheClockObj.id = params.orderPlanId;
-			this.coalStatus = params.coalStatus;
-		}
+		this.punchTheClockObj.tmcoa = params.tmId.toString();
+		this.coalStatus = params.coalStatus;
 	},
 	data() {
 		return {
 			nowTime: '',
 			coalStatus: 0,
 			punchTheClockObj: {
-				latitude: null,
-				longitude: null,
-				id: null
+				tmcoa: null,
+				latA: null,
+				latB: null
 			}
 		};
 	},
@@ -69,8 +67,8 @@
 				type: 'wgs84',
 				success(res) {
 					console.log(res, '鑾峰彇浣嶇疆', that);
-					that.punchTheClockObj.latitude = res.latitude;
-					that.punchTheClockObj.longitude = res.longitude;
+					that.punchTheClockObj.latB = res.latitude;
+					that.punchTheClockObj.latA = res.longitude;
 				}
 			});
 		},
@@ -81,7 +79,8 @@
 		},
 		// 绛惧埌
 		arrive() {
-			if (this.punchTheClockObj.latitude && this.punchTheClockObj.longitude) {
+			if (this.punchTheClockObj.latA && this.punchTheClockObj.latB) {
+				console.log(this.punchTheClockObj);
 				this.$reqPost('arrive', this.punchTheClockObj, 'params').then(res => {
 					console.log(res, '绛惧埌');
 					if (res.code == 0) {
@@ -95,7 +94,7 @@
 							);
 						});
 					} else {
-						this.$u.toast(res.data ? res.data : '绛惧埌澶辫触');
+						this.$u.toast(res.msg ? res.msg : '绛惧埌澶辫触');
 					}
 				});
 			} else {
@@ -123,7 +122,7 @@
 			display: flex;
 			justify-content: center;
 			align-items: center;
-			p{
+			p {
 				text-align: center;
 			}
 		}

--
Gitblit v1.9.1