@@ -178,18 +178,18 @@ class Index extends Component {
const res = data.response || {}
if (res.code !== 200) {
msgSocketList.push({msg: res.codeMsg + '|暂无法接收消息,请退出当前页面重新登录~'})
+ that.setState({
+ msgSocketList
+ }, () => {
+ setTimeout(() => {
+ viewId: `item${msgSocketList.length - 1}`
+ that.closeSocket()
+ })
+ }, 100)
}
- that.setState({
- msgSocketList
- }, () => {
- setTimeout(() => {
- viewId: `item${msgSocketList.length - 1}`
- that.closeSocket()
- })
- }, 100)
// task.close()
})