shuishen
2025-10-11 3fc27febccd04e2fcffbd2cdd16d2daafd0b3ca3
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
33
34
35
<template>
  <view class="page-wrap">
    <web-view
      ref="sWebViewRef"
      src='http://192.168.1.15:5173/command-center-dashboard/#/appTaskDetails'
      @message="onPostMessage"
      @onPostMessage="onPostMessage"
    />
  </view>
</template>
 
<script setup>
 
import {onLoad} from "@dcloudio/uni-app";
 
const active = defineModel('active')
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
    }
  });
})
 
</script>
 
<style scoped lang="scss">
 
</style>