消息提醒
This commit is contained in:
@ -316,15 +316,11 @@ const monitorWebSocket = (ws)=>{
|
||||
ws.onmessage = function (res) {
|
||||
if(res.data){
|
||||
let data = JSON.parse(res.data)
|
||||
if(window.isConversationURLChanged){//路由变化
|
||||
window.msgAlertForCustomerService = true
|
||||
showMsg()
|
||||
}else {
|
||||
if(window.isBlurForCustomerService){//失焦
|
||||
showMsg()
|
||||
}
|
||||
if(window.isConversationURLChanged!= true){
|
||||
setWsMsg(data)
|
||||
}
|
||||
window.msgAlertForCustomerService = true
|
||||
showMsg()
|
||||
}
|
||||
};
|
||||
|
||||
@ -359,7 +355,6 @@ useEffect(()=>{
|
||||
window.isConversationURLChanged = isChanged
|
||||
}else{
|
||||
if(window.isConversationURLChanged != undefined){ //路由切换回来
|
||||
//stopMsg()
|
||||
window.isConversationURLChanged = isChanged
|
||||
}
|
||||
}
|
||||
@ -507,6 +502,7 @@ useEffect(() => {
|
||||
setIsImgPreviewVisible(true)
|
||||
}}
|
||||
reConnect={()=>{
|
||||
setMsgList([])
|
||||
websocketInit(staffId)
|
||||
setLoading(true)
|
||||
getMoreMessage(1)
|
||||
|
Reference in New Issue
Block a user