例子( 更多詳情見官網: 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證書這一個選項選上
- 使用
這個標簽需要在小程序管理后台設置業務域名,登錄后台后找到設置-開發設置-業務域名,然后把你需要加載的域名添加進去