From 379d64998edf01b19d396a8d364ef9d81f985268 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Tue, 14 Oct 2025 11:17:05 +0800
Subject: [PATCH] feat:更新代码

---
 src/subPackages/taskDetail/execution/index.vue |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/src/subPackages/taskDetail/execution/index.vue b/src/subPackages/taskDetail/execution/index.vue
index 6d683e5..034aa96 100644
--- a/src/subPackages/taskDetail/execution/index.vue
+++ b/src/subPackages/taskDetail/execution/index.vue
@@ -1,8 +1,35 @@
 <!-- 已执行 -->
 <template>
-  <view> 基础 </view>
+  <web-view ref="sWebViewRef" :src="`${viewUrl}`" @message="onPostMessage" @onPostMessage="onPostMessage" />
 </template>
 
-<script setup></script>
+<script setup>
+import {onLoad} from "@dcloudio/uni-app";
+import {useUserStore} from "@/store/index.js";
+
+const sWebViewRef = ref(null);
+const userStore = useUserStore();
+let viewUrl = ''
+
+function onPostMessage(event) {
+  if (event.detail.data[0].type === 'back') {
+    // active.value = null
+  }
+}
+
+// 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}`;
+});
+</script>
 
 <style lang="scss" scoped></style>

--
Gitblit v1.9.3