From a5025a9428f7bf41b665d773123dd94244518ee4 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 20 Oct 2025 09:23:53 +0800
Subject: [PATCH] Merge branch 'master' of http://139.196.74.78:10010/r/drone/drone-app

---
 src/subPackages/workDetail/index.vue |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/subPackages/workDetail/index.vue b/src/subPackages/workDetail/index.vue
index dac2931..d9d4852 100644
--- a/src/subPackages/workDetail/index.vue
+++ b/src/subPackages/workDetail/index.vue
@@ -1,21 +1,21 @@
 <!-- 工单详情 - 包含待审核、待处理、处理中、已完成 -->
 <template>
 	<div class="workDetailContainer">
-		 <WebViewPlus ref="sWebViewRef" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
+		 <WebViewPlus v-if="isApp" ref="sWebViewRef" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
 	</div>
 </template>
 
 <script setup>
+		import {getWebViewUrl} from "@/utils/index.js";
 	import { onLoad } from '@dcloudio/uni-app';
 	import { useUserStore } from '@/store/index.js'
 	const userStore = useUserStore()
 	const userInfo = userStore.userInfo
 	const sWebViewRef = ref(null);
-	const viewUrl = ref(`http://192.168.1.157:5173/drone-app-web-view/#/webViewWrapper/workDetail?params=${JSON.stringify(userStore?.userInfo)}`);
+	const viewUrl = ref('')
 	onLoad( (options) => {
-		const eventNum= options.eventNum;
-		
-		viewUrl.value =`http://192.168.1.157:5173/drone-app-web-view/#/webViewWrapper/workDetail?params=${JSON.stringify(userStore?.userInfo)}&eventNum=${eventNum}`
+		const eventNum= options.eventNum;	
+		viewUrl.value = getWebViewUrl('/workDetail', {eventNum:eventNum})	
 	});
 	
 	function onPostMessage(data) {
@@ -26,6 +26,14 @@
 	    });
 	  }
 	}
+	const isApp = ref(false)
+	onShow(() => {
+	  isApp.value = true
+	});
+	
+	onHide(() => {
+	  isApp.value = false
+	});
 </script>
 
 <style lang="scss" scoped>

--
Gitblit v1.9.3