|
|
|
@ -146,13 +146,14 @@
|
|
|
|
|
const store = useStore();
|
|
|
|
|
store.dispatch('chat/queryCurCustomerService');
|
|
|
|
|
const socketInit = () => {
|
|
|
|
|
if (!store.state.chat.curCustomerService.waiterId) {
|
|
|
|
|
let waiterId = store.state.chat.curCustomerService.waiterId;
|
|
|
|
|
if (!waiterId) {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
socketInit();
|
|
|
|
|
}, 1000);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
ImInit(store.state.chat.curCustomerService.waiterId).then(() => {
|
|
|
|
|
ImInit(waiterId).then(() => {
|
|
|
|
|
Im.getSessionList();
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|