通过webview在小程序内部打开链接
webview.vue页面
<template>
<web-view :src="webUrl"></web-view>
</template>
<script>
export default {
name: "webview",
data() {
return {
webUrl: ''
};
},
onLoad() {
uni.getStorage({
key:"WEB_URL",
success: (res) => {
this.webUrl = res.data
}
})
}
}
</script>
<style>
</style>
然后在pages.json中配置webview.vue页面路径
{
"path": "components/webview",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
然后调用subItemHandler 触发页面跳转
// 跳转到webview页面
s