Browse Source

iourl = root

release_0.0.2
巴林闲侠 3 years ago
parent
commit
7279365a62
  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