| src/subPackages/workDetail/index.vue | ●●●●● patch | view | raw | blame | history | |
| src/subPackages/workDetail/mapWork/index.vue | ●●●●● patch | view | raw | blame | history |
src/subPackages/workDetail/index.vue
@@ -6,16 +6,16 @@ </template> <script setup> import {getWebViewUrl} from "@/utils/index.js"; import { onLoad } from '@dcloudio/uni-app'; import { useUserStore } from '@/store/index.js' const userStore = useUserStore() const userInfo = userStore.userInfo const sWebViewRef = ref(null); const viewUrl = ref(`http://192.168.1.157:5173/drone-app-web-view/#/webViewWrapper/workDetail?params=${JSON.stringify(userStore?.userInfo)}`); const viewUrl = ref('') onLoad( (options) => { const eventNum= options.eventNum; viewUrl.value =`http://192.168.1.157:5173/drone-app-web-view/#/webViewWrapper/workDetail?params=${JSON.stringify(userStore?.userInfo)}&eventNum=${eventNum}` const eventNum= options.eventNum; viewUrl.value = getWebViewUrl('/workDetail', {eventNum:eventNum}) }); function onPostMessage(data) { src/subPackages/workDetail/mapWork/index.vue
@@ -1,8 +1,21 @@ <!-- 地图展示 --> <template> <view> 基础 </view> <WebViewPlus ref="sWebViewRef" :src="`${viewUrl}`" @webMessage="onPostMessage"/> </template> <script setup></script> <script setup> import {getWebViewUrl} from "@/utils/index.js"; import { onLoad } from '@dcloudio/uni-app'; const sWebViewRef = ref(null); const viewUrl = ref('') onLoad( (options) => { const currentItem = options.currentItem viewUrl.value = getWebViewUrl('/mapWork', {currentItem:currentItem}) }); </script> <style lang="scss" scoped></style>