|
|
@ -2,12 +2,13 @@
|
|
|
|
* @Author: ch
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-05-18 14:54:47
|
|
|
|
* @Date: 2022-05-18 14:54:47
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-06-10 10:10:21
|
|
|
|
* @LastEditTime: 2022-06-10 19:15:46
|
|
|
|
* @Description: file content
|
|
|
|
* @Description: file content
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
import '@/utils/poto-req';
|
|
|
|
import '@/utils/poto-req';
|
|
|
|
import '@/utils/proto-rsp';
|
|
|
|
import '@/utils/proto-rsp';
|
|
|
|
import { CreateUUID, ToAsyncAwait } from '@/utils/utils';
|
|
|
|
import { CreateUUID, ToAsyncAwait } from '@/utils/utils';
|
|
|
|
|
|
|
|
|
|
|
|
const connect = Symbol('connect');
|
|
|
|
const connect = Symbol('connect');
|
|
|
|
const send = Symbol('send');
|
|
|
|
const send = Symbol('send');
|
|
|
|
const onMessage = Symbol('onMessage');
|
|
|
|
const onMessage = Symbol('onMessage');
|
|
|
@ -363,6 +364,9 @@ class MsbIm {
|
|
|
|
createTimeStamp: new Date().getTime(),
|
|
|
|
createTimeStamp: new Date().getTime(),
|
|
|
|
sendStatus: 'loading',
|
|
|
|
sendStatus: 'loading',
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
if (typeof msgCtx.payload === 'string') {
|
|
|
|
|
|
|
|
msgCtx.payload = JSON.parse(msgCtx.payload);
|
|
|
|
|
|
|
|
}
|
|
|
|
// 点发送,立即把消息加入消息列表,标记为发送中状态
|
|
|
|
// 点发送,立即把消息加入消息列表,标记为发送中状态
|
|
|
|
curSession.messageList.push(msgCtx);
|
|
|
|
curSession.messageList.push(msgCtx);
|
|
|
|
// 超过时间未返回视为发送失败
|
|
|
|
// 超过时间未返回视为发送失败
|
|
|
@ -453,6 +457,3 @@ class MsbIm {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export default MsbIm;
|
|
|
|
export default MsbIm;
|
|
|
|
// export default (app) => {
|
|
|
|
|
|
|
|
// app.config.globalProperties.$im = MsbIm;
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|