commit
e8763793a7
|
@ -285,8 +285,11 @@ export class ImChat {
|
|||
// callback: (data) => {}
|
||||
}
|
||||
// console.log('发送消息', option)
|
||||
this.setConsole('%cim-chat: 发送消息', option)
|
||||
return this.timChat.TIMMsgSendMessageV2(option)
|
||||
this.setConsole('%cim-chat: 发送消息【req】', conv_id, msg)
|
||||
return this.timChat.TIMMsgSendMessageV2(option).then(res => {
|
||||
this.setConsole('%cim-chat: 发送消息【res】', JSON.stringify(res))
|
||||
return res
|
||||
})
|
||||
}
|
||||
/**
|
||||
* @description 发送群消息
|
||||
|
|
|
@ -128,7 +128,7 @@ const closeHomework = async() => {
|
|||
const successHomework = (data)=>{
|
||||
// console.log('推送成功', data)
|
||||
// 发送im消息-推送作业(app|平板)
|
||||
ipcMsgInvoke('im-chat:msg', data, MsgEnum.HEADS.MSG_0016)
|
||||
// ipcMsgInvoke('im-chat:msg', data, MsgEnum.HEADS.MSG_0016)
|
||||
}
|
||||
// 章节目录change
|
||||
const changeChapter = async (data)=>{
|
||||
|
|
|
@ -12,7 +12,7 @@ const props = defineProps({
|
|||
})
|
||||
const imChatObj = reactive({imChat:null})
|
||||
onMounted(() => {
|
||||
ipcMainHandle() // 绑定-监听ipcMain im相关消息
|
||||
// ipcMainHandle() // 绑定-监听ipcMain im相关消息
|
||||
})
|
||||
// 初始化 im-chat
|
||||
const initImChat = async (timGroupId) => {
|
||||
|
|
|
@ -105,7 +105,7 @@ const getClassInfo = async () => {
|
|||
const chat = await imChatRef.value?.initImChat(timGroupId) // 初始化im-chat
|
||||
if (!timGroupId) timGroupId = chat?.timGroupId
|
||||
if (!timGroupId) return ElMessage.error('房间创建-失败')
|
||||
classManageApi.startClass(classObj.id, timGroupId) // 开始上课
|
||||
if (data.status != '上课中') classManageApi.startClass(classObj.id, timGroupId) // 开始上课
|
||||
}
|
||||
// 切换tab-change
|
||||
const tabChange = (val) => {
|
||||
|
@ -158,7 +158,7 @@ const touchChange = (e) => {
|
|||
const chatChange = (type, data, ...args) => {
|
||||
if (type == 'createGroup') { // 创建群-监听
|
||||
console.log('创建群:', data)
|
||||
!!data && classManageApi.startClass(classObj.id, data)
|
||||
// !!data && classManageApi.startClass(classObj.id, data)
|
||||
} else if (type == 'msg') { // im-chat 消息监听
|
||||
if (!data) return // 没有msg数据 message_msg_id
|
||||
const msgId = (args||[])[0].message_msg_id
|
||||
|
|
Loading…
Reference in New Issue