|
|
|
@@ -120,7 +120,7 @@ Page({ |
|
|
|
wx.connectSocket({ |
|
|
|
url: `ws://` + app.webSocketUrl + `/webSocket/{"userno":${receiveMemberId},"messageModule":"010"}`,//本地 |
|
|
|
success: function () { |
|
|
|
console.log('websocket连接成功~') |
|
|
|
console.log('websocket接口调通~还没真正的成功!') |
|
|
|
}, |
|
|
|
fail: function () { |
|
|
|
console.log('websocket连接失败~') |
|
|
|
@@ -130,6 +130,11 @@ Page({ |
|
|
|
//连接成功 |
|
|
|
wx.onSocketOpen(function () { |
|
|
|
console.log('onSocketOpen', '连接成功,真正的成功'); |
|
|
|
// wx.showToast({ |
|
|
|
// title: '连接成功,真正的成功', |
|
|
|
// icon: 'success', |
|
|
|
// duration: 2000 |
|
|
|
// }) |
|
|
|
}) |
|
|
|
|
|
|
|
// 接收服务器的消息事件 |
|
|
|
@@ -228,7 +233,7 @@ Page({ |
|
|
|
// 滚动到底部 |
|
|
|
scrollBottom: function () { |
|
|
|
this.setData({ |
|
|
|
scrollid:"sendmessage" |
|
|
|
scrollid: "sendmessage" |
|
|
|
}) |
|
|
|
}, |
|
|
|
|