<!-- h5嵌入页面 --> <template> <div> <!-- <NavBar :show="true" :opacity="1" :navRect="navRect" borderColor="transparent" /> --> <web-view style="padding-top: -140px;" :src="getUrl" ></web-view> </div> </template> <script> import NavBar from '../../components/nav.vue' import { getLocationParams } from '../../common/utils.js' export default { data() { return { getUrl: '', navRect: {} // 自定义导航栏rect } }, mounted() { const rect = uni.getMenuButtonBoundingClientRect(); this.navRect = rect; this.getUrl = decodeURIComponent(getLocationParams('url')); console.log(this.getUrl, 'url') // 通知公告的h5显示 -> 通知公告 // console.log(getLocationParams('label')) // if (getLocationParams('label') === '通知公告') { // wx.setNavigationBarTitle({ // title: "通知公告", // }); // } // if (getLocationParams('type') === 'tzgg') { // setTimeout(() => { // wx.setNavigationBarTitle({ // title: "111", // }); // },2000) // } }, } </script> <style> </style>