在APP内新建一个空白页面用来展示,空白页面里面就一个标签<web-view>
<template>
<view>
<web-view :src="url"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
url:''//指向网页跳转的连接
}
},
onLoad(options) {
var that=this
that.url=options.url+'?username=*******&password=*******'//携带账号密码,自动登录
},
methods: {
}
}
</script>
APP内部的按钮或者文字,点击了就跳转到h5网页
点击函数:
tiaozhuan(){
uni.navigateTo({
url:'/pages/web/web?url=自己h5的地址'
})
}
APP的权限配置,打开:
<uses-permission android:name="android.permission.INTERNET"/>