socket为什么测试版能用,正式版不能用啊
onReady: function () { wx.connectSocket({ url: 'wss://mini.zhongxiangok.com:4431' }) var that = this; wx.onSocketMessage(function (res) { that.setData({ message:res.data+(new Date).getSeconds() }) console.log('收到服务器内容:' + res.data) })}, |
难道是端口问题吗,不是说端口随便的么
