fix: bug
This commit is contained in:
+5
-2
@@ -15,10 +15,13 @@ export const useSocketStore = defineStore('socketStore',{
|
||||
},
|
||||
actions:{
|
||||
creatSocket(){
|
||||
let _baseUrl = get_base_url().split('http').join('ws')
|
||||
console.log(_baseUrl)
|
||||
if(this.SocketObj && this.SocketObj?.close) {
|
||||
closeSocket()
|
||||
this.closeSocket()
|
||||
}
|
||||
this.SocketObj = new SocketClass(get_base_url() + '/trastudy/trasoket/open?summary=' + getToken());
|
||||
|
||||
this.SocketObj = new SocketClass(_baseUrl + '/trastudy/trasoket/open?summary=' + getToken());
|
||||
},
|
||||
closeSocket: () => {
|
||||
if(!this.SocketObj || !this.SocketObj?.close) return
|
||||
|
||||
Reference in New Issue
Block a user