From be4e2d7c2b330c3b8991a0286ea16cc1285b9ec0 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Fri, 08 May 2026 17:47:32 +0800
Subject: [PATCH] feat: 微信小程序支持上传头像
---
src/subPackages/droneConsole/index.vue | 44 ++++++++++++++++++++++++--------------------
1 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/src/subPackages/droneConsole/index.vue b/src/subPackages/droneConsole/index.vue
index bf30ab0..b296006 100644
--- a/src/subPackages/droneConsole/index.vue
+++ b/src/subPackages/droneConsole/index.vue
@@ -6,21 +6,19 @@
import {onHide, onLoad, onShow} from "@dcloudio/uni-app";
import WebViewPlus from "@/components/WebViewPlus.vue";
import {getEnvObj, getWebViewUrl} from "@/utils/index.js";
-import Recorder from "js-audio-recorder";
-import dayjs from "dayjs";
import {useUserStore} from "@/store/index.js";
-
-const queryParams = ref({})
-
-const viewUrl = computed(() => {
- return getWebViewUrl('/DroneConsole', queryParams.value)
-})
function onPostMessage(data) {
if (data.type === 'back'){
+ // #ifdef H5
+ window.history.back()
+ // #endif
+
+ // #ifdef APP-PLUS
uni.navigateBack({
delta: 1 // 返回的页面数,默认1(返回上一页)
});
+ // #endif
}
}
@@ -78,22 +76,28 @@
})
}
+const viewUrl = ref("");
onLoad((options) => {
- queryParams.value = options
+ viewUrl.value = getWebViewUrl("/DroneConsole", {
+ wayLineJobInfoId: options.wayLineJobInfoId,
+ dockSn: options.dockSn,
+ });
})
-// 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