|
|
@ -54,8 +54,8 @@ router.beforeEach(async (to, from, next) => { |
|
|
|
//登录后连接webSocket
|
|
|
|
const userStorageInfo = sessionStorage.getItem('userInfo'); |
|
|
|
const userInfo = JSON.parse(userStorageInfo === null ? '' : userStorageInfo); |
|
|
|
const wsUrl = `ws://${window.location.host}/ws/websocket/${userInfo.userName}`; //websocket地址
|
|
|
|
// const wsUrl = `ws://10.10.10.56:9010/websocket/${userInfo.userName}`; //websocket地址
|
|
|
|
// const wsUrl = `ws://${window.location.host}/ws/websocket/${userInfo.userName}`; //websocket地址
|
|
|
|
const wsUrl = `ws://10.10.10.56:9010/websocket/${userInfo.userName}`; //websocket地址
|
|
|
|
socket.initialize(wsUrl); |
|
|
|
next({ ...to, replace: true }); |
|
|
|
} catch (error) { |
|
|
|