微信应用号小程序wx.onSocketError(CALLBACK)
时间:2016-10-03 21:13:14
收藏:0
阅读:349
微信应用号小程序wx.onSocketError(CALLBACK)
wx.onSocketError(CALLBACK)
? 监听WebSocket错误
示例代码:
wx.connectSocket({
url:"qkxue.net"
});
wx.onSocketOpen(function(res){
console.log("WebSocket连接已打开!")
})
wx.onSocketError(function(res){
console.log("WebSocket连接打开失败,请检查!")
})
稿源:勤快学QKXue.NET
评论(0)