[]HttpRequest有一定几率触发error事件 Status:0
在微信开发者工具中,调用
request.send(url + method, data, "post", "json", ["Content-Type","application/json","Authorization", "Bearer " + PlayerModel.Instance.token]);
大部分时候正常 但有20%的几率会触发error事件回调,收到的message为"failed Status:0 text:"
只在本次运行的第一次调用会出现,如果第一次没有触发error则后面的所有send也不会触发error
而第一次触发error则后面的所有send都会触发error
request.send(url + method, data, "post", "json", ["Content-Type","application/json","Authorization", "Bearer " + PlayerModel.Instance.token]);
大部分时候正常 但有20%的几率会触发error事件回调,收到的message为"failed Status:0 text:"
只在本次运行的第一次调用会出现,如果第一次没有触发error则后面的所有send也不会触发error
而第一次触发error则后面的所有send都会触发error
没有找到相关结果
已邀请:
要回复问题请先登录
7 个回复
qian
赞同来自:
shicheju
赞同来自:
Apple
赞同来自:
linchenrr
赞同来自:
Apple
赞同来自:
linchenrr
赞同来自:
linchenrr
赞同来自:
不要再找自己服务器、代码的原因,这是laya的坑
修改创建项目时laya生成的game.json文件,将networkTimeout里的各项都设置长一些
laya默认生成的值为1000 也就是1秒就超时