diff --git a/src/renderer/src/plugins/imChat/index.js b/src/renderer/src/plugins/imChat/index.js index ed48817..3b42935 100644 --- a/src/renderer/src/plugins/imChat/index.js +++ b/src/renderer/src/plugins/imChat/index.js @@ -169,12 +169,12 @@ export class ImChat { logout() { if (!this.timChat) return return this.timChat.TIMLogout().then(res => { - console.log('登出成功', res) + this.setConsole('%cim-chat: logout', '登出成功') this.status.isLogin = false this.timChat.TIMUninit() // 反初始化 return res }).catch(error => { - console.log('登出失败', error) + this.setConsole('%cim-chat: logout', '登出失败', error) return error }) } diff --git a/src/renderer/src/views/tool/components/homework.vue b/src/renderer/src/views/tool/components/homework.vue index 13967e0..35c1c61 100644 --- a/src/renderer/src/views/tool/components/homework.vue +++ b/src/renderer/src/views/tool/components/homework.vue @@ -77,7 +77,7 @@ import { getSmarttalkPage } from '@/api/file' import SetHomework from '@/components/set-homework/index.vue' import FileImage from '@/components/file-image/index.vue' import { useGetHomework } from '@/hooks/useGetHomework' -import { ipcMsgSend, ipcMsgInvoke } from '@/utils/tool' +import { ipcMsgSend, ipcMsgSend2, ipcMsgInvoke } from '@/utils/tool' import { useToolState } from '@/store/modules/tool' import Lesson from './lesson.vue'; import { parseCataByNode } from '@/utils/talkFile' diff --git a/src/renderer/src/views/tool/components/upvote.vue b/src/renderer/src/views/tool/components/upvote.vue index 8f12e4f..91c1fcc 100644 --- a/src/renderer/src/views/tool/components/upvote.vue +++ b/src/renderer/src/views/tool/components/upvote.vue @@ -1,9 +1,15 @@ \ No newline at end of file diff --git a/src/renderer/src/views/tool/sphere.vue b/src/renderer/src/views/tool/sphere.vue index 6e9d9fe..cef6cde 100644 --- a/src/renderer/src/views/tool/sphere.vue +++ b/src/renderer/src/views/tool/sphere.vue @@ -7,7 +7,7 @@ - + @@ -67,7 +67,8 @@ const classObj = reactive({ // 课程相关 data: {} // 课程信息 }) const msgIds = [] // 消息id -const btnList = [ // 工具栏按钮列表 +const electron = window.electron // electron +const btnList = [ // 工具栏按钮列表 { label: '选择', value: 'select', icon: 'icon-mouse' }, { label: '画笔', value: 'brush', icon: 'icon-huabi' }, { label: '板擦', value: 'erase', icon: 'icon-xiangpica' }, @@ -78,9 +79,10 @@ const btnList = [ // 工具栏按钮列表 ] // === 页面加载完毕 === onMounted(async() => { - getClassInfo() // 获取课堂详情 ex3 + if (!electron) return // 浏览器端 + getClassInfo() // 获取课堂详情 ex3 setTimeout(() => { - resetStatus() // 开启重置状态-监听 + resetStatus() // 开启重置状态-监听 }, 200); }) @@ -130,7 +132,7 @@ const chatChange = (type, data, ...args) => { case MsgEnum.HEADS.MSG_0002: // 疑惑 // console.log('点赞:', data) if(msgIds.includes(msgId)) return // 忽略重复-点赞消息 - upvoteRef.value.trigger(data.name) // 触发点赞|疑惑 + upvoteRef.value.trigger(head, data.name) // 触发点赞|疑惑 if (msgIds.length >= 100) msgIds.shift() // 删除第一个 msgIds.push(msgId) // 添加到数组 break