• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 37 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0031 秒)

1. 求解关于跨域的具体操作 [ 100%]

...道怎么写 之前我个人写的 不知道是不是在这个里面 var xhr = new XMLHttpRequest(); xhr.open("GET",url, true) xhr.setRequestHeader("Accept", "*/*"); xhr.setRequestHeader("Content-Type", "application/json"); 还是说用参考代码里的HttpRequest() var xhr = new Laya.HttpRequest()...

来源: Laya_社区 发布时间: 20180704

2. HttpRequest感觉没有发成功 [ 96%]

...里用得不对?代码如下 //初始化引擎 Laya.init(1136,640); var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); xhr.send("https...

来源: Laya_社区 发布时间: 20180827

3. 打包缓存问题 [ 94%]

...表Achieve.json后,重新layadcc 后 第一次打开项目后日志显示xhr.get url=http://192.168.200.3:8889/configs/Achieve471a2538.json 第二次打开项目后日志还是显示xhr.get url=http://192.168.200.3:8889/configs/Achieve471a2538.json   按官网的流程图应该是发现有重新...

来源: Laya_社区 发布时间: 20190313

4. Native 如何使用ttf? [ 92%]

...ox.ttf 参照扩展字体 https://ldc.layabox.com/doc/?nav=zh-ts-7-2-9 var xhr = new XMLHttpRequest(); xhr.responseType = 'arraybuffer'; xhr.open('GET', "res/font/Arial.ttf", true); xhr.onload = function () { Laya.Browser.window.conch.setFontFaceFromBuffer("Arial", xhr.response); setInterval(onDrawF...

来源: Laya_社区 发布时间: 20181106

5. 排坑:Laya.HttpRequest()无效 [ 92%]

...,什么也获取不到 下面是代码 console.log("开始测试"); var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE, this, completeHandler); xhr.once(Event.ERROR, this, errorHandler); xhr.on(Event.PROGRESS, this, processHandler); xhr.send(...

来源: Laya_社区 发布时间: 20180208

6. Laya.HttpRequest 没有调用回调方法? [ 91%]

...est 没有调用回调方法? //初始化引擎 Laya.init(1136,640); var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); xhr.send("http...

来源: Laya_社区 发布时间: 20180830

7. 打包成Android应用,获取首页链接经常超时最后卡在加载界面 [ 91%]

...时最后卡在加载界面 09-23 11:41:15.458 16178-16304/? I/LayaBox:  xhr.GET url=http://192.168.0.130/release/index_app.html?app=1 09-23 11:41:15.469 16178-16271/? I/LayaBox: Download [  ]:http://192.168.0.130/release/index_app.html?app=1 09-23 11:41:23.476 16178-16271/? W/LayaBox: download er...

来源: Laya_社区 发布时间: 20170923

8. 官方的示例贴上来,怎么没反映啊 [ 91%]

...var JiHuo = (function (_super) { function JiHuo() { JiHuo.super(this); var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE, this, completeHandler); xhr.once(Event.ERROR, this, errorHandler); xhr.on(Event.PROGRESS, this, processHandler); xhr.send...

来源: Laya_社区 发布时间: 20180419

9. web和微信端没有问题,打包成apk后 httprequest报Request failed Status:404 text:undefined [ 91%]

...请: 与内容相关的链接 提交 2 个回复 金风 赞同来自: this.xhr.once(Laya.Event.COMPLETE, this, this.CompleteHandler); this.xhr.once(Laya.Event.ERROR, this, this.ErrorHandler); this.xhr.on(Laya.Event.PROGRESS, this, this.ProgressHandler); this.xhr.send(Global.WebHost+this.currentReque...

来源: Laya_社区 发布时间: 20200629

10. laya2.8.0IDE工具中打安卓包(LayaNative版本相同),无法加载游戏启动页 [ 87%]

...aBox:  onerror UnknownError      assetsid old:  new:null I/LayaBox:  xhr.GET *l=http://happiness.joyleafs.com/ncapi/client/app*/index.json I/LayaBox: Download [  ]:http://happiness.joyleafs.com/ncapi/client/app*/index.json W/LayaBox: download error: timeout, dt=8,opttimeout=1798 I/LayaBox: Do...

来源: Laya_社区 发布时间: 20210305