From 08fcc710d0a2acb185b3477d72fe32aff6f2e29a Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Mon, 01 Dec 2025 16:23:03 +0800
Subject: [PATCH] feat:增加ws连接状态
---
src/subPackages/inProgress/index.vue | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/src/subPackages/inProgress/index.vue b/src/subPackages/inProgress/index.vue
index a23c9b8..8de6b29 100644
--- a/src/subPackages/inProgress/index.vue
+++ b/src/subPackages/inProgress/index.vue
@@ -1,15 +1,15 @@
<template>
- <WebViewPlus :src="`${viewUrl}`" @webMessage="onPostMessage"/>
+ <WebViewPlus v-if="showComponent" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
</template>
<script setup>
import WebViewPlus from "@/components/WebViewPlus.vue";
import {getWebViewUrl} from "@/utils/index.js";
-import {onLoad} from "@dcloudio/uni-app";
+import {onHide, onLoad, onShow} from "@dcloudio/uni-app";
const wayLineJodInfoId = ref(null)
const viewUrl = ref('')
-
+const showComponent = ref(false)
function onPostMessage(data) {
if (data.type === 'back') {
uni.switchTab({
@@ -17,7 +17,7 @@
});
} else if (data.type === 'control') {
uni.navigateTo({
- url: `/subPackages/droneConsole/index?wayLineJodInfoId=${wayLineJodInfoId.value}`
+ url: `/subPackages/droneConsole/index?wayLineJodInfoId=${wayLineJodInfoId.value}&dockSn=${data.dockSn}`
});
}
}
@@ -26,6 +26,18 @@
wayLineJodInfoId.value = options.wayLineJodInfoId
viewUrl.value = getWebViewUrl('/TaskInProgress', {wayLineJodInfoId: wayLineJodInfoId.value})
})
+
+onShow(function () {
+ showComponent.value = true
+ // #ifdef APP-PLUS
+ plus.navigator.setFullscreen(false);
+ plus.screen.lockOrientation("portrait-primary");
+ // #endif
+})
+
+onHide(() =>{
+ showComponent.value = false
+})
</script>
<style scoped lang="scss">
--
Gitblit v1.9.3