mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
fix: 修复桌面版导出成功后没哟欧提示
This commit is contained in:
parent
bf9e4fea8c
commit
609a31b71f
@ -22,6 +22,9 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
function isLoginStatus() {
|
function isLoginStatus() {
|
||||||
|
if (wsCache.get('app.desktop')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
return wsCache.get('user.token') && wsCache.get('user.uid')
|
return wsCache.get('user.token') && wsCache.get('user.uid')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,17 +48,17 @@ export default {
|
|||||||
if (!prefix.endsWith('/')) {
|
if (!prefix.endsWith('/')) {
|
||||||
prefix += '/'
|
prefix += '/'
|
||||||
}
|
}
|
||||||
console.log('newSockJS')
|
const userId = wsCache.get('app.desktop') ? 1 : wsCache.get('user.uid')
|
||||||
const socket = new SockJS(prefix + 'websocket?userId=' + wsCache.get('user.uid'))
|
const socket = new SockJS(prefix + 'websocket?userId=' + userId)
|
||||||
stompClient = Stomp.over(socket)
|
stompClient = Stomp.over(socket)
|
||||||
const heads = {
|
const heads = {
|
||||||
userId: wsCache.get('user.uid')
|
userId: userId
|
||||||
}
|
}
|
||||||
stompClient.connect(
|
stompClient.connect(
|
||||||
heads,
|
heads,
|
||||||
() => {
|
() => {
|
||||||
channels.forEach(channel => {
|
channels.forEach(channel => {
|
||||||
stompClient.subscribe('/user/' + wsCache.get('user.uid') + channel.topic, res => {
|
stompClient.subscribe('/user/' + userId + channel.topic, res => {
|
||||||
res && res.body && useEmitt().emitter.emit(channel.event, res.body)
|
res && res.body && useEmitt().emitter.emit(channel.event, res.body)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user