uni.navigateTo({
url: '/pages/webView/webViewBanner?url=' + encodeURIComponent(item)
});
<template>
<web-view :src="url" @load="onLoad" @message="onMessage"></web-view>
</template>
<script>
export default {
data() {
return {
url: ''
};
},
async onLoad(option){
this.url = option.url
},
onMessage(event) {
// 处理webview发送的消息
},
mounted() {
}
};
</script>