添加画布颜色历史

This commit is contained in:
X1627315083
2024-09-27 16:31:33 +08:00
parent e26d57dd76
commit 21b0af1365
32 changed files with 423 additions and 885 deletions

View File

@@ -7,7 +7,6 @@ class MyWs {
this.messageUrl = http+'/notification'
}
linkWs(url) {
console.log(this.ws && this.ws.readyState == 1);
if (this.ws && this.ws.readyState == 1) return
this.ws = new WebSocket(url)
this.ws.onmessage = (e)=>{
@@ -17,14 +16,11 @@ class MyWs {
console.error('websocket',error)
}
}
console.log(this.ws);
}
static receiveText(data,call){
console.log('receive',data);
MyEvent.emit('getMessage',data)
}
sendMessage(data) {
console.log(this);
if (this.ws && this.ws.readyState == 1) {
let obj = {
cmd: 1,
@@ -50,7 +46,6 @@ class MyWs {
}
}
send(obj) {
console.log(2323);
this.ws.send(JSON.stringify(obj))
}
close(){