From 32febb140d320b35d580c8d4e78a80ef846e75fc Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 19 Dec 2025 15:59:34 +0800
Subject: [PATCH] feat:webview通信处理
---
src/subPackages/droneConsole/index.vue | 41 +++++++++++++++++++++++++----------------
1 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/src/subPackages/droneConsole/index.vue b/src/subPackages/droneConsole/index.vue
index c357ebc..a947943 100644
--- a/src/subPackages/droneConsole/index.vue
+++ b/src/subPackages/droneConsole/index.vue
@@ -10,19 +10,26 @@
import dayjs from "dayjs";
import {useUserStore} from "@/store/index.js";
-const wayLineJodInfoId = ref(null)
+const queryParams = ref({})
const viewUrl = computed(() => {
- return getWebViewUrl('/DroneConsole', {
- wayLineJodInfoId: wayLineJodInfoId.value,
- })
+ return getWebViewUrl('/DroneConsole', queryParams.value)
})
function onPostMessage(data) {
if (data.type === 'back'){
+ // uni.navigateTo({
+ // url: `/subPackages/inProgress/index?wayLineJobInfoId=${data.taskDetails.id}`
+ // });
+ // #ifdef H5
+ window.history.back()
+ // #endif
+
+ // #ifdef APP-PLUS
uni.navigateBack({
delta: 1 // 返回的页面数,默认1(返回上一页)
});
+ // #endif
}
}
@@ -81,21 +88,23 @@
}
onLoad((options) => {
- wayLineJodInfoId.value = options.wayLineJodInfoId
+ queryParams.value = options
})
-// onShow(() => {
-// // #ifdef APP-PLUS
-// plus.screen.lockOrientation("landscape-primary");
-// // #endif
-// });
-//
-// onHide(() => {
-// // #ifdef APP-PLUS
-// plus.screen.lockOrientation("portrait-primary");
-// // #endif
-// });
+onShow(() => {
+ // #ifdef APP-PLUS
+ plus.navigator.setFullscreen(true); // 加入全屏
+ plus.screen.lockOrientation("landscape-primary");//横屏
+ // #endif
+});
+
+onHide(() => {
+ // #ifdef APP-PLUS
+ plus.navigator.setFullscreen(false);
+ plus.screen.lockOrientation("portrait-primary");
+ // #endif
+});
</script>
<style scoped lang="scss">
--
Gitblit v1.9.3