chenyao
2025-10-17 4de4baa6eea8f80160f6cdc8a4ebd17c0c48f0ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!-- 已执行 -->
<template>
  <WebViewPlus v-if="isApp" :src="`${viewUrl}`"/>
</template>
 
<script setup>
import {onHide, onLoad, onShow} from "@dcloudio/uni-app";
import WebViewPlus from "@/components/WebViewPlus.vue";
import {getWebViewUrl} from "@/utils/index.js";
 
const viewUrl = ref(getWebViewUrl('/execution'))
 
// 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
});
 
onHide(() => {
  isApp.value = false
});
</script>
 
<style lang="scss" scoped></style>