[LayaAirIDE 2.0]iOS wkWebView
ios打包使用wkWebView构建出来的工程,测试有一个手机是ios13.7的系统无法发送http请求,也不报任何的错误日志,公司其它ios手机都没问题,求大神给解答下啊!
private connect(): void {
console.log("connect....");
this.hr = new Laya.HttpRequest();
this.hr.once(Laya.Event.PROGRESS, this, this.onHttpRequestProgress);
this.hr.once(Laya.Event.COMPLETE, this, this.onHttpRequestComplete);
this.hr.once(Laya.Event.ERROR, this, this.onHttpRequestError);
this.hr.send('http://tdev.sanguoh5.com:8001/?r=h.a.a', null, 'get', 'text');
}
private onHttpRequestError(e: any): void {
console.log("error==>"+e);
}
private onHttpRequestProgress(e: any): void {
console.log("progress==>"+e);
}
private onHttpRequestComplete(e: any): void {
console.log("complete==>"+e);
}
private connect(): void {
console.log("connect....");
this.hr = new Laya.HttpRequest();
this.hr.once(Laya.Event.PROGRESS, this, this.onHttpRequestProgress);
this.hr.once(Laya.Event.COMPLETE, this, this.onHttpRequestComplete);
this.hr.once(Laya.Event.ERROR, this, this.onHttpRequestError);
this.hr.send('http://tdev.sanguoh5.com:8001/?r=h.a.a', null, 'get', 'text');
}
private onHttpRequestError(e: any): void {
console.log("error==>"+e);
}
private onHttpRequestProgress(e: any): void {
console.log("progress==>"+e);
}
private onHttpRequestComplete(e: any): void {
console.log("complete==>"+e);
}
要回复问题请先登录
1 个回复
156*****628
赞同来自:
2020-10-23 14:07:22.741707+0800 TTF[1207:194638] JSLog:error==>Request failed Status:0 text:
直接就Status:0,服务端也收不到请求