问题原因:因为跨域问题不能访问。
解决方法:设置允许跨域
1.在resource底下创建目录resfile,将本地资源weblogin、dist(访问的h5文件)拷贝进去
2.加一个属性
.onControllerAttached(()=>{
this.webProxy.getWebViewController().setPathAllowingUniversalAccess([
getContext().resourceDir,
])
})
问题原因:因为跨域问题不能访问。
解决方法:设置允许跨域
1.在resource底下创建目录resfile,将本地资源weblogin、dist(访问的h5文件)拷贝进去
2.加一个属性
.onControllerAttached(()=>{
this.webProxy.getWebViewController().setPathAllowingUniversalAccess([
getContext().resourceDir,
])
})