From 4de4baa6eea8f80160f6cdc8a4ebd17c0c48f0ee Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Fri, 17 Oct 2025 16:43:12 +0800
Subject: [PATCH] feat:提交代碼

---
 src/subPackages/taskDetail/execution/index.vue |   43 ++++++++++++++++++++-----------------------
 1 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/src/subPackages/taskDetail/execution/index.vue b/src/subPackages/taskDetail/execution/index.vue
index 034aa96..09234ef 100644
--- a/src/subPackages/taskDetail/execution/index.vue
+++ b/src/subPackages/taskDetail/execution/index.vue
@@ -1,34 +1,31 @@
 <!-- 已执行 -->
 <template>
-  <web-view ref="sWebViewRef" :src="`${viewUrl}`" @message="onPostMessage" @onPostMessage="onPostMessage" />
+  <WebViewPlus v-if="isApp" :src="`${viewUrl}`"/>
 </template>
 
 <script setup>
-import {onLoad} from "@dcloudio/uni-app";
-import {useUserStore} from "@/store/index.js";
+import {onHide, onLoad, onShow} from "@dcloudio/uni-app";
+import WebViewPlus from "@/components/WebViewPlus.vue";
+import {getWebViewUrl} from "@/utils/index.js";
 
-const sWebViewRef = ref(null);
-const userStore = useUserStore();
-let viewUrl = ''
+const viewUrl = ref(getWebViewUrl('/execution'))
 
-function onPostMessage(event) {
-  if (event.detail.data[0].type === 'back') {
-    // active.value = null
-  }
-}
+// function onPostMessage(data) {
+//   console.log(data, '9999')
+//   if (data.type === 'taskDetails'){
+//     console.log('4444')
+//     uni.switchTab({
+//       url: '/subPackages/taskDetail/execution/index'
+//     });
+//   }
+// }
+const isApp = ref(false)
+onShow(() => {
+  isApp.value = true
+});
 
-// onLoad(() => {
-//   window.addEventListener('message', function (e) {
-//     if (e.data.data.type === 'back') {
-//       // active.value = null
-//     }
-//   });
-// })
-
-onLoad((options) => {
-  // console.log('options1111111', JSON.parse(decodeURIComponent(options)));
-  const id=3333
-  viewUrl = `http://192.168.1.178:5173/drone-app-web-view/#/webViewWrapper/execution?rowItem=${id}`;
+onHide(() => {
+  isApp.value = false
 });
 </script>
 

--
Gitblit v1.9.3