mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 21:19:37 +08:00
1
This commit is contained in:
parent
47d93bb036
commit
abc07be3aa
@ -5,8 +5,9 @@
|
|||||||
.roomContainer {
|
.roomContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-evenly;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
padding: 0 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.roomContainer .roomItem {
|
.roomContainer .roomItem {
|
||||||
|
@ -297,16 +297,15 @@ Page({
|
|||||||
|
|
||||||
// 初始化socket
|
// 初始化socket
|
||||||
initSocket() {
|
initSocket() {
|
||||||
const ws = new WebSocket("ws:///222.184.49.22:8081/websocket-server");
|
let socketTask = wx.connectSocket({
|
||||||
ws.onopen = function () {
|
url: 'ws:///222.184.49.22:8081/websocket-server',
|
||||||
console.log('链接建立成功')
|
header: {
|
||||||
};
|
'content-type': 'application/json'
|
||||||
ws.onmessage = function (evt) {
|
}
|
||||||
console.log(evt.data)
|
})
|
||||||
};
|
socketTask.onMessage(res=>{
|
||||||
ws.onclose = function () {
|
console.log('onMessage' , res);
|
||||||
console.log('链接已经关闭')
|
})
|
||||||
};
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user