使用webView的时候,出现Error loading page Domain:WebKitErrorDomain Error Code:101 Description: The URL can't be shown


onShouldStartLoadWithRequest = (e) => {
// Implement any custom loading logic here, don't forget to return!
// 解决WebKitErrorDomain code:101的警告
// http://leonhwa.com/blog/0014905236320002ebb3db97fe64fb3bb6f047eafb1c5de000
var scheme = e.url.split('://')[0]
if (scheme === 'http' || scheme === 'https') {
return true
}
return false
};


免责声明!

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



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