forked from github/dataease
fix: 单词拼写错误
This commit is contained in:
parent
a78ae36320
commit
83b4be06c8
@ -20,8 +20,8 @@ class DeWebsocket {
|
|||||||
initialize() {
|
initialize() {
|
||||||
this.connection()
|
this.connection()
|
||||||
const _this = this
|
const _this = this
|
||||||
this.timer = this.isLoginStatu() && setInterval(() => {
|
this.timer = this.isLoginStatus() && setInterval(() => {
|
||||||
this.isLoginStatu() || this.destroy()
|
this.isLoginStatus() || this.destroy()
|
||||||
try {
|
try {
|
||||||
_this.client && _this.client.send('heart detection')
|
_this.client && _this.client.send('heart detection')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -41,12 +41,12 @@ class DeWebsocket {
|
|||||||
this.initialize()
|
this.initialize()
|
||||||
}
|
}
|
||||||
|
|
||||||
isLoginStatu() {
|
isLoginStatus() {
|
||||||
return store.state && store.state.user && store.state.user.user && store.state.user.user.userId
|
return store.state && store.state.user && store.state.user.user && store.state.user.user.userId
|
||||||
}
|
}
|
||||||
|
|
||||||
connection() {
|
connection() {
|
||||||
if (!this.isLoginStatu()) {
|
if (!this.isLoginStatus()) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const socket = new SockJS(this.ws_url + '?userId=' + store.state.user.user.userId)
|
const socket = new SockJS(this.ws_url + '?userId=' + store.state.user.user.userId)
|
||||||
@ -70,6 +70,7 @@ class DeWebsocket {
|
|||||||
}
|
}
|
||||||
).bind(this)
|
).bind(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
subscribe() {
|
subscribe() {
|
||||||
this.channels.forEach(channel => {
|
this.channels.forEach(channel => {
|
||||||
this.client.subscribe('/user/' + store.state.user.user.userId + channel.topic, res => {
|
this.client.subscribe('/user/' + store.state.user.user.userId + channel.topic, res => {
|
||||||
@ -77,6 +78,7 @@ class DeWebsocket {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnect() {
|
disconnect() {
|
||||||
this.client && this.client.disconnect()
|
this.client && this.client.disconnect()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user