diff --git a/src/ui/src/index.js b/src/ui/src/index.js index 8f42dda3a..c16d2fb31 100644 --- a/src/ui/src/index.js +++ b/src/ui/src/index.js @@ -26,7 +26,7 @@ import * as socketAction from './redux/actions/socket' export const store = configureStore() if (window.localStorage.getItem('isLogin')) { - socketAction.connetctSocket() + socketAction.connectSocket() } if (module.hot) { diff --git a/src/ui/src/redux/actions/login/index.js b/src/ui/src/redux/actions/login/index.js index 91f6c2ff4..8ce65619c 100644 --- a/src/ui/src/redux/actions/login/index.js +++ b/src/ui/src/redux/actions/login/index.js @@ -40,7 +40,7 @@ const userLogin = ({username, password, type, success}) => { window.localStorage.setItem('isLogin', true) window.localStorage.setItem('authToken', response.data.token) window.localStorage.setItem('username', response.data.currentAuthority) - // connetctSocket() + // connectSocket() window.location.href = '/' success && success() } else if (response.code === 1) { diff --git a/src/ui/src/redux/actions/socket/index.js b/src/ui/src/redux/actions/socket/index.js index 347668191..a96425ce0 100644 --- a/src/ui/src/redux/actions/socket/index.js +++ b/src/ui/src/redux/actions/socket/index.js @@ -36,7 +36,7 @@ const setSocketStatus = (data) => ({ payload: data }) -const connetctSocket = () => { +const connectSocket = () => { const authToken = window.localStorage.getItem('authToken') let host = getHost() if (host === '') { @@ -118,6 +118,6 @@ const socketMessage = (e) => { export { setSocketData, setSocketStatus, - connetctSocket, + connectSocket, TYPE } diff --git a/src/ui/src/views/Worktop/ServiceStatus/index.js b/src/ui/src/views/Worktop/ServiceStatus/index.js index 090faea1c..b4d00bf83 100644 --- a/src/ui/src/views/Worktop/ServiceStatus/index.js +++ b/src/ui/src/views/Worktop/ServiceStatus/index.js @@ -28,7 +28,7 @@ const { Row, Col } = Grid class ServiceStatus extends Component { componentDidMount () { - socketAction.connetctSocket() + socketAction.connectSocket() // set BreadCrumbs const crumbsItems = [