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

大约有 1,108 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0047 秒)

111. 求解关于跨域的具体操作 [ 71%]

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

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

112. XMLRequest在layaNative下请求崩溃,请求官方协助! [ 71%]

...(this: void, data: JSON) => void): void {         let hr = new Laya.HttpRequest();         hr.once(Laya.Event.COMPLETE, this, (e: any): void => {             callback(JSON.parse(hr.data));         });       hr.send(url, JSON.stringify(data), 'post', 'text', ['content-type'...

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

113. Array buffer allocation failed [ 71%]

...常,真机报错:Request failed Status:0 text( 加载场景失败) HttpRequest在ios系统出现Request failed Status:0 text:,安卓没事 scriptEngine 0xc30edooo loadScriptStringWithCodeCache failed 发布QQ包报错 安卓的QQ扫码时运行不出来 求助大佬们!oppo游戏中3d资...

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

114. 请问2.0中js怎么加天空盒子或穹顶,官网例子运行报错。 [ 70%]

...core.js:16316) at EventHandler.__proto.runWith (libs/laya.core.js:1399) at HttpRequest.__proto.event (libs/laya.core.js:1156) at HttpRequest.__proto.complete (libs/laya.core.js:14101) at HttpRequest.__proto._onLoad (libs/laya.core.js:14065) //=======穹顶 var scene = Laya.stage.addChild(new Laya.Sc...

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

115. Http 请求里用来接收返回数据的data导致clearRes不能从内存里清理资源 [ 70%]

...的引用,而不能从内存里回收资源。 我想知道为什么在httprequest里的data不用局部变量在接收请求数据呢? 2017-11-29 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_XS 赞同...

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

116. HTTP以POST发送Byte字节流,服务器无法解析 [ 68%]

...码: function starConnection() { console.log("starConnection"); conn=new HttpRequest(); conn.once(Event.PROGRESS, this, onHttpRequestProgress); conn.once(Event.COMPLETE, this, onHttpRequestComplete); conn.once(Event.ERROR, this, onHttpRequestError); var buffBody=new Byte(); buffBody.endian=Byte.BI...

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

117. 打包app,http无法设置content-type [ 68%]

...-type也变成了application/x-www-form-urlencoded   代码如下: static httpRequest(method:string, url:string, data:any, headers:Array<string>, cb:(err:Error, data?:any)=>void) { let req = new Request(); req.on(Event.COMPLETE, this, (data) => { cb(null, data); }); req.on(Event.ERROR, ...

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

118. Loader.load加载json类型的资源,完成后调用Loader.clearRes后,并不能真正释放资源的bug [ 68%]

...发现loader._http引用着加载结果导致释放不了。   补充: HttpRequest 定义了一个_data保存结果,是不是没必要的?回调完成后可以清空 附件 : --> 2018-10-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相...

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

119. 请问我用下面的代码发送个简单的http get请求,为什么在电脑上能得到成功输出,在手机上总是得到失败输出呢? [ 65%]

...254.151.248/sf_serve ... 3B%3B alert("url=" + url); var req = new laya.net.HttpRequest(); req.on(laya.events.Event.COMPLETE, null, cb_onSuccess); req.on(laya.events.Event.ERROR, null, cb_onFail); req.send(url); } function cb_onSuccess(response) { alert("response=" + response); // 成功输出:{"re...

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

120. tiledMap 官方示例都运行不了 [ 63%]

...ministrator/Documents/myLaya/Hello/bin/libs/laya.core.js:1125:59)     at HttpRequest.__proto.event (file:///C:/Users/Administrator/Documents/myLaya/Hello/bin/libs/laya.core.js:882:28) TypeError: Cannot read property 'split' of undefined     at TiledMap.__proto.mergePath (file:///C:/Users/Adminis...

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