无法上课PPT的问题解决

This commit is contained in:
朱浩 2024-10-15 18:39:50 +08:00
parent 540229cd9b
commit ec8f7b5727
2 changed files with 17 additions and 17 deletions

View File

@ -80,8 +80,8 @@ import { updateUserInfo } from '@/api/system/user'
import logoIco from '@/assets/images/logo.png' import logoIco from '@/assets/images/logo.png'
import { listEvaluation } from '@/api/classManage/index' import { listEvaluation } from '@/api/classManage/index'
import { sessionStore } from '@/utils/store' import { sessionStore } from '@/utils/store'
import Chat from '@/utils/chat' // im // import Chat from '@/utils/chat' // im
if (!Chat.imChat) Chat.init() // if (!Chat.imChat) Chat.init()
let homeTitle = ref(import.meta.env.VITE_APP_TITLE) let homeTitle = ref(import.meta.env.VITE_APP_TITLE)
const { ipcRenderer } = window.electron || {} const { ipcRenderer } = window.electron || {}
@ -145,7 +145,7 @@ function handleCommand(command) {
break break
case 'logout': case 'logout':
logout() logout()
Chat?.logout() // im 退 // Chat?.logout() // im 退
break break
default: default:
break break
@ -161,7 +161,9 @@ function logout() {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}) })
.then(() => { .then(async () => {
const Chat = (await import('@/utils/chat')).default
if (!!Chat.imChat) Chat.logout()
userStore userStore
.logOut() .logOut()
.then(() => { .then(() => {
@ -172,8 +174,7 @@ function logout() {
// router.replace('/login') // router.replace('/login')
ipcRenderer && ipcRenderer.send('openLoginWindow') ipcRenderer && ipcRenderer.send('openLoginWindow')
}) })
}) }).catch(()=>{})
.catch(() => { })
} }
const emits = defineEmits(['setLayout']) const emits = defineEmits(['setLayout'])

View File

@ -69,7 +69,6 @@ export class Chat {
async logout() { async logout() {
if (!this.imChat) return if (!this.imChat) return
await this.imChat?.logout() await this.imChat?.logout()
imChat = null
this.imChat = null this.imChat = null
} }
// 发群消息 // 发群消息