3 files modified
1 files added
1 files deleted
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/inspectionTask/TaskDetails/DroneConsole/DroneConsole", |
| | | "path": "pages/inspectionTask/DroneConsole/DroneConsole", |
| | | "style": { |
| | | "navigationBarTitleText": "控制台", |
| | | "navigationStyle": "custom" |
| | |
| | | "navigationBarBackgroundColor": "#F8F8F8", |
| | | "backgroundColor": "#F8F8F8" |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <template> |
| | | <WebViewPlus :src="`${viewUrl}`" @webMessage="onPostMessage"/> |
| | | </template> |
| | | <script setup> |
| | | import {onHide, onShow} from "@dcloudio/uni-app"; |
| | | import WebViewPlus from "@/components/WebViewPlus.vue"; |
| | | import {getWebViewUrl} from "@/utils/index.js"; |
| | | |
| | | const viewUrl = getWebViewUrl('/DroneConsole', {wayLineJodInfoId: 6120}) |
| | | |
| | | function onPostMessage(event) { |
| | | |
| | | } |
| | | |
| | | |
| | | // onShow(() => { |
| | | // // #ifdef APP-PLUS |
| | | // plus.screen.lockOrientation("landscape-primary"); |
| | | // // #endif |
| | | // }); |
| | | // |
| | | // onHide(() => { |
| | | // // #ifdef APP-PLUS |
| | | // plus.screen.lockOrientation("portrait-primary"); |
| | | // // #endif |
| | | // }); |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | |
| | | </style> |
| | |
| | | import {getWebViewUrl} from "@/utils/index.js"; |
| | | |
| | | const userStore = useUserStore() |
| | | |
| | | const viewUrl = getWebViewUrl('/appTaskDetails', {wayLineJodInfoId: 6120}) |
| | | const viewUrl = getWebViewUrl('/TaskInProgress', {wayLineJodInfoId: 6120}) |
| | | |
| | | |
| | | function onPostMessage(data) { |
| | |
| | | }); |
| | | }else if(data.type === 'control'){ |
| | | uni.redirectTo({ |
| | | url: '/pages/inspectionTask/TaskDetails/DroneConsole/DroneConsole' |
| | | url: '/pages/inspectionTask/DroneConsole/DroneConsole' |
| | | }); |
| | | } |
| | | } |
| | |
| | | export function getWebViewUrl(targetUrl,otherParams){ |
| | | const userStore = useUserStore() |
| | | const url = import.meta.env.VITE_APP_WEBVIEW_URL |
| | | console.log(url,686) |
| | | // 构建查询参数 |
| | | const params = new URLSearchParams() |
| | | params.append('params', JSON.stringify(userStore?.userInfo)) |