From 0f34d97b5c0c559b3d132bf1171de43a5ea9a596 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 04 九月 2025 17:43:25 +0800
Subject: [PATCH] 设备保养真机测试,bug修改

---
 src/pages/equipmentManagement/upkeep/add.vue |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/pages/equipmentManagement/upkeep/add.vue b/src/pages/equipmentManagement/upkeep/add.vue
index c0e7e34..fbdf304 100644
--- a/src/pages/equipmentManagement/upkeep/add.vue
+++ b/src/pages/equipmentManagement/upkeep/add.vue
@@ -301,19 +301,20 @@
 
 // 杩斿洖涓婁竴椤�
 const goBack = () => {
+	// 娓呴櫎瀛樺偍鐨刬d
+	uni.removeStorageSync('repairId');
 	uni.navigateBack();
 };
 
 // 鑾峰彇椤甸潰鍙傛暟
 const getPageParams = () => {
-	const pages = getCurrentPages();
-	const currentPage = pages[pages.length - 1];
-	const options = currentPage.options;
+	// 浠庢湰鍦板瓨鍌ㄨ幏鍙杋d
+	const id = uni.getStorageSync('repairId');
 	
 	// 鏍规嵁鏄惁鏈塱d鍙傛暟鏉ュ垽鏂槸鏂板杩樻槸缂栬緫
-	if (options.id) {
+	if (id) {
 		// 缂栬緫妯″紡锛岃幏鍙栬鎯�
-		loadForm(options.id);
+		loadForm(id);
 	} else {
 		// 鏂板妯″紡
 		loadForm();
@@ -322,10 +323,8 @@
 
 // 鑾峰彇椤甸潰ID
 const getPageId = () => {
-	const pages = getCurrentPages();
-	const currentPage = pages[pages.length - 1];
-	const options = currentPage.options;
-	return options.id;
+	// 浠庢湰鍦板瓨鍌ㄨ幏鍙杋d
+	return uni.getStorageSync('repairId');
 };
 </script>
 

--
Gitblit v1.9.3