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

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

161. websocket连接出错 [ 52%]

...连接出错 function openHandler(event){ //正确建立连接 this.socket.send('foo','OOOO'); } function receiveHandler(msg){ console.log(event); //接收到数据触发函数 // socket.emit('login',{username:123}) } function closeHandler(e){ //关闭事件 } 2018-11-07 添加评论 免费帖 --> ...

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

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

...(!hasContentType){ headers.push("content-type", "application/json"); } req.send(url, body, method, "json", headers); }Net.httpRequest("post","http://xxxx",{a:1},null,cb) 2017-01-23 1 条评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提...

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

163. 微信小游戏 code.js 报错 Cannot read property 'apply' of undefined [ 52%]

...ncode] (http://127.0.0.1:25423/game/code.js:59362:17)     at AwesomeData.Send (http://127.0.0.1:25423/game/code.js:61458:35)     at NetSocketManager.onSocketOpen (http://127.0.0.1:25423/game/code.js:61514:39)     at WebSocket.webSocket.onopen (http://127.0.0.1:25423/game/code.js:61506:53)   ...

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

164. 如何让发布后的H5加载资源用src或href指向本地路径,而不是网络请求 [ 52%]

...  me._err();             };             request.send();         } 2020-01-07 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 0 个回复 为什么被折叠? 0 个回复被折叠 要回复问...

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

165. 如何与服务端建立连接 [ 51%]

...出错} 发送 同byte 例如你的传输 json 转byte 类型 this.socket.send(this.byte.buffer);//这里是把字节数组的数据通过socket发送给服务器。 接收数据 receiveHandler 函数 msg 看你用到传输格式 是json 就转json xml 转xml 然后就可以获得你的数据 2018-0...

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

166. ios读取文件 [ 51%]

...己决定url     loadUrl(url); } xhr.onerror=()=>{     //TODO } xhr.send(); 问题是动态url的话,会导致打包资源失效,因为资源是与url绑定的。 2017-07-04 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 xz352...

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

167. HttpRequest问题 [ 51%]

...改后f12打开控制台报错是什么 15818760256 • 2018-02-08 14:19 send(url: string, data?: any, method?: string, responseType?: string, headers?: Array<any>): void; 这个发送的时候加入header,header里面的key-value如果key是固定的命名吗?如果value值是"Access...

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

168. 打包后启动游戏后报错 [ 51%]

...器里都可以正常运行,打包后才会出现问题 public function send(type:String,url:String,callbackName:String):void { this.type = type; //发送请求 var script:* = Browser.createElement("script"); script.id = "serverlist"; Browser.document.head.appendChild(script); script.src = url; sc...

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

169. 用最新版本的IDE开发,用AS语言开发,用HttpRequest加载图片报错,用JS语言开发却可以加载 [ 50%]

...MPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.send("res/monkey2.png","","get","arraybuffer"); } private function completeHandler(data:Object):void { //加载完成返回的data是arraybuffer; //.......这里处理我们加密的图片数据,假设我们的图片加...

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

170. js socket 连接不上 [ 50%]

...连接出错 function openHandler(event){ //正确建立连接 this.socket.send('foo','OOOO'); } function receiveHandler(msg){ console.log(event); //接收到数据触发函数 // socket.emit('login',{username:123}) } function closeHandler(e){ //关闭事件 } function errorHandler(e){ //连接出...

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