Browse Source

Merge branch 'dev_trial' of https://gitea.free-sun.vip/free-sun/FS-IOT into dev_trial

release_0.0.2
wenlele 2 years ago
parent
commit
5a0da83039
  1. 2
      code/VideoAccess-VCMP/web/client/src/layout/actions/webSocket.js

2
code/VideoAccess-VCMP/web/client/src/layout/actions/webSocket.js

@ -5,6 +5,7 @@ export const INIT_WEB_SOCKET = 'INIT_WEB_SOCKET'
export function initWebSocket ({ ioUrl, token }) { export function initWebSocket ({ ioUrl, token }) {
if (!ioUrl) { if (!ioUrl) {
ioUrl = localStorage.getItem('apiRoot') ioUrl = localStorage.getItem('apiRoot')
ioUrl = JSON.parse(ioUrl).root
} }
if (!token) { if (!token) {
const user = sessionStorage.getItem('user') const user = sessionStorage.getItem('user')
@ -17,6 +18,7 @@ export function initWebSocket ({ ioUrl, token }) {
type: '', type: '',
} }
} }
console.log(ioUrl);
return dispatch => { return dispatch => {
const socket = io(ioUrl, { const socket = io(ioUrl, {
query: { query: {

Loading…
Cancel
Save