添加画布颜色历史
This commit is contained in:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user