|
@@ -8,7 +8,6 @@ import styles from './index.less'
|
|
|
import { apiLogin } from '@/services/login'
|
|
import { apiLogin } from '@/services/login'
|
|
|
import { setAuthCache } from '@/utils/auth'
|
|
import { setAuthCache } from '@/utils/auth'
|
|
|
import { TOKEN_KEY } from '@/utils/cache/cacheEnum'
|
|
import { TOKEN_KEY } from '@/utils/cache/cacheEnum'
|
|
|
-import ws, { onMessage } from '@/utils/ws'
|
|
|
|
|
|
|
|
|
|
const LoginMessage = ({ content }) => (
|
|
const LoginMessage = ({ content }) => (
|
|
|
<Alert
|
|
<Alert
|
|
@@ -44,10 +43,10 @@ const Login = () => {
|
|
|
const permData = await initialState?.fetchPermData?.()
|
|
const permData = await initialState?.fetchPermData?.()
|
|
|
if (userInfo) {
|
|
if (userInfo) {
|
|
|
setInitialState({ ...initialState, ...userInfo, permData })
|
|
setInitialState({ ...initialState, ...userInfo, permData })
|
|
|
- const { username, staffId: id, wsToken: token } = userInfo?.currentUser
|
|
|
|
|
- ws.init(`ws://cld2qa.com/summon/v1/chat/link?username=${username}&id=${id}&token=${token}`, {
|
|
|
|
|
- onMessage
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ // const { username, staffId: id, wsToken: token } = userInfo?.currentUser
|
|
|
|
|
+ // ws.init(`ws://cld2qa.com/summon/v1/chat/link?username=${username}&id=${id}&token=${token}`, {
|
|
|
|
|
+ // onMessage
|
|
|
|
|
+ // })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|