Merge branch 'feat-im-0607-ch' into msb_test

msb_test
ch 3 years ago
commit 10103f16f8

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-06-07 15:41:05 * @Date: 2022-06-07 15:41:05
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-06-14 14:59:41 * @LastEditTime: 2022-06-14 15:26:44
* @Description: file content * @Description: file content
*/ */
import * as api from '@/api/chat'; import * as api from '@/api/chat';
@ -49,7 +49,7 @@ const getters = {
payload = '[撤回消息]'; payload = '[撤回消息]';
} else if (type === 6 || type === 1) { } else if (type === 6 || type === 1) {
if (payload.customType === 'transferWaiterSession') { if (payload.customType === 'transferWaiterSession') {
let str = `${payload.fromNickname}将会话转移给了---${payload.toNickname}`; let str = `${payload.fromNickname}将会话转移给了${payload.toNickname}`;
if (payload.reason) { if (payload.reason) {
str += `,并留言:${payload.reason}`; str += `,并留言:${payload.reason}`;
} }

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

@ -4,7 +4,7 @@
:class="{ :class="{
[`--${messageType[props.message.type]}`]: true, [`--${messageType[props.message.type]}`]: true,
'--notify': messageType[props.message.type] === 'custom' && content.type === 'transferWaiterSession', '--notify': messageType[props.message.type] === 'custom' && content.type === 'transferWaiterSession',
'--self': props.message.fromId !== props.session.fromId, '--self': props.message.fromId == $store.state.chat.curCustomerService.waiterId,
}" }"
> >
<!-- --> <!-- -->

Loading…
Cancel
Save