赞
踩
如图所示
1.新建webView页面
<template> <web-view v-if='httpUrl' :src='httpUrl'></web-view> </template> <script> export default { data() { return { httpUrl: "", }; }, onLoad(options) { options.httpUrl = decodeURIComponent(options.httpUrl); this.httpUrl = options.httpUrl; }, methods: {}, }; </script> <style> </style>
2.跳转页面
// 页面跳转
toPage(url) {
uni.navigateTo({
url: '/pages/PageWebview?httpUrl=' + encodeURIComponent('https://www.baidu.com')
})
},
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。