修改课程记录bug
This commit is contained in:
@@ -15,6 +15,7 @@ export const useSocketStore = defineStore('socketStore',{
|
||||
},
|
||||
actions:{
|
||||
creatSocket(url = '/trastudy/trasoket/open?summary='){
|
||||
console.log('打开websocket');
|
||||
if(this.SocketObj && this.SocketObj?.close && !this.SocketObj?.isClose) {
|
||||
return
|
||||
}
|
||||
@@ -25,6 +26,7 @@ export const useSocketStore = defineStore('socketStore',{
|
||||
this.SocketObj = new SocketClass(_baseUrl + url + getToken());
|
||||
},
|
||||
closeSocket() {
|
||||
console.log('关闭websocket');
|
||||
if(!(this.SocketObj && this.SocketObj?.close)) return
|
||||
this.SocketObj && this.SocketObj.close()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user