fix: 打包错误信息处理
This commit is contained in:
+4
-4
@@ -19,11 +19,11 @@ export const useSocketStore = defineStore('socketStore',{
|
||||
if(this.SocketObj && this.SocketObj?.close) return
|
||||
this.SocketObj = new SocketClass(_baseUrl + '/trastudy/trasoket/open?summary=' + getToken());
|
||||
},
|
||||
closeSocket: () => {
|
||||
if(!this.SocketObj || !this.SocketObj?.close) return
|
||||
this.SocketObj && this.SocketObj?.close?.()
|
||||
closeSocket() {
|
||||
if(!(this.SocketObj && this.SocketObj?.close)) return
|
||||
this.SocketObj && this.SocketObj.close()
|
||||
},
|
||||
setOnmessageCb: (cb) => {
|
||||
setOnmessageCb(cb){
|
||||
if(!this.SocketObj || !this.SocketObj?.on) return
|
||||
this.SocketObj.on('message', cb)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user