uniapp 中嵌入h5网页

<view class="u-page__item" v-on:click="itemClick('</view>
methods:{
			 itemClick (url) {
			                 // 跳转到内部窗口并且传递链接
			                uni.navigateTo({
			                    url: `/pages/wb?url=${url}`
			                })
			            },
<template>
    <view>
        <web-view :src="url"></web-view>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                url: ''
            }
        },
        onLoad(e) {
             // 获取传递过来的链接
            this.url = e.url
        }
    }
</script>


暂无留言,赶快评论吧

欢迎留言