uni-app中使用web-view展示h5页面及相关问题


例子( 更多详情见官网: https://uniapp.dcloud.io/component/web-view?id=web-view )

<template>
	<view class="container">
            <web-view :src="weburl"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				weburl:'',
				
			};
		},
		onLoad() {
			this.weburl="https://demo/video/videoplay"
		},
	}
</script>

uniapp-小程序web-view加载一个https网页的时候出现了{"base_resp":{"ret":-1}}

  • 解决:将不校验合法域名、web-view(业务域名)、TLS版本及HTTPS证书这一个选项选上
  • 使用 这个标签需要在小程序管理后台设置业务域名,登录后台后找到设置-开发设置-业务域名,然后把你需要加载的域名添加进去

使用外部浏览器打开H5

见: https://www.jianshu.com/p/1733a384dace


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM