|
@@ -92,7 +92,6 @@ const $chat = {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- sendImage(userId, option, success) {},
|
|
|
sendText(userId, content, success, fail) {
|
|
|
connect(() => {
|
|
|
//创建文字消息
|
|
@@ -122,7 +121,6 @@ const $chat = {
|
|
|
//监听会话列表更新
|
|
|
YeIMUniSDK.getInstance().addEventListener(YeIMUniSDKDefines.EVENT.CONVERSATION_LIST_CHANGED, (
|
|
|
list) => {
|
|
|
- console.log(list);
|
|
|
store.dispatch('app/changeChatList', list);
|
|
|
});
|
|
|
})
|
|
@@ -130,36 +128,6 @@ const $chat = {
|
|
|
clearConversationUnread(conversationId) {
|
|
|
//清除指定会话未读数,并给对方发送已读回执
|
|
|
YeIMUniSDK.getInstance().clearConversationUnread(conversationId);
|
|
|
- },
|
|
|
- sendSystemMessage() {
|
|
|
- let timestamp = (new Date()).getTime() + 86400 * 1000; //1000天后过期
|
|
|
- let sign = md5('system' + timestamp + "50abd47112ebe8c5a73f4694c96a49ce");
|
|
|
- login({
|
|
|
- userId: 'system',
|
|
|
- timestamp: timestamp,
|
|
|
- sign: sign
|
|
|
- }).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- localStorage.setItem('systemChatToken', res.data.token);
|
|
|
- sendSystem({
|
|
|
- body: {
|
|
|
- text: "2"
|
|
|
- },
|
|
|
- conversationId: "4",
|
|
|
- conversationType: "private",
|
|
|
- extra: "",
|
|
|
- from: 'system',
|
|
|
- fromUserInfo: {},
|
|
|
- isDeleted: 0,
|
|
|
- isRead: 0,
|
|
|
- isRevoke: 0,
|
|
|
- status: "unSend",
|
|
|
- time: new Date().getTime(),
|
|
|
- to: 1,
|
|
|
- type: "text",
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
}
|
|
|
}
|
|
|
export default $chat;
|