<template>
|
<view class="page-wrap">
|
<WebViewPlus :src="`${viewUrl}`" @webMessage="onPostMessage" />
|
</view>
|
</template>
|
|
<script setup>
|
import { getWebViewUrl } from "@/utils/index.js";
|
import WebViewPlus from "@/components/WebViewPlus.vue";
|
import { onHide, onShow, } from "@dcloudio/uni-app";
|
import { useUserStore } from "@/store/index.js";
|
// const viewUrl = getWebViewUrl("/defaultMap");
|
|
let envParam = "";
|
// #ifdef WEB
|
envParam = "true";
|
// #endif
|
// #ifdef APP-PLUS
|
envParam = "false";
|
// #endif
|
|
const userStore = useUserStore();
|
const userParams = userStore?.userInfo ? JSON.stringify(userStore.userInfo) : '{}';
|
|
const updateKey = ref(0);
|
const viewUrl = computed(() => {
|
return getWebViewUrl("/defaultMap", {
|
isWeb: envParam,
|
updateKey: updateKey.value,
|
});
|
});
|
|
const onPostMessage = (data) => {
|
};
|
|
onShow(() => {
|
// #ifndef MP-WEIXIN
|
|
// #endif
|
});
|
|
onHide(() => {
|
updateKey.value = updateKey.value + 1;
|
});
|
</script>
|
|
<style scoped lang="scss">
|
.page-wrap {
|
font-size: 20px;
|
}
|
</style>
|