Merge pull request '修改作业弹窗' (#122) from zxl into main

Reviewed-on: #122
This commit is contained in:
zhangxuelin 2024-12-12 16:38:33 +08:00
commit c5e71e6e7b
1 changed files with 32 additions and 30 deletions

View File

@ -714,37 +714,39 @@ const closeDialog = () => {
// im // im
const msgHandle = (msg) => { const msgHandle = (msg) => {
const { type, data } = msg if (typeof msg === 'object'){
switch(type) { const { head, content, ...other } = msg
case MsgEnum.HEADS.MSG_closed: // : switch(head) {
case MsgEnum.HEADS.MSG_closed: // :
window.close() //
break
case MsgEnum.HEADS.MSG_finishHomework: // :
const data = JSON.parse(localStorage.getItem('teachClassWorkItem'));
openDialog(data, false);
break
case MsgEnum.HEADS.MSG_slideFlapping: //
window.close() // window.close() //
break break
case MsgEnum.HEADS.MSG_finishHomework: // : // case 'TIMAddRecvNewMsgCallback': // data=[]
const data = JSON.parse(localStorage.getItem('teachClassWorkItem')); // {
openDialog(data, false); // (data||[]).forEach(o => {
break // const msgArr = o?.message_elem_array||[]
case MsgEnum.HEADS.MSG_slideFlapping: // // msgArr.forEach(info => {
window.close() // // const msgType = info?.elem_type // TIMElemType
break // const msgData = !!info.text_elem_content ? JSON.parse(info.text_elem_content)||'' : ''
// case 'TIMAddRecvNewMsgCallback': // data=[] // //
// { // //console.log('msgData->', msgData);
// (data||[]).forEach(o => { // if (msgData.msgKey == "finishHomework"){
// const msgArr = o?.message_elem_array||[] // //
// msgArr.forEach(info => { // const data = JSON.parse(localStorage.getItem('teachClassWorkItem'));
// const msgType = info?.elem_type // TIMElemType // //console.log('data->', data);
// const msgData = !!info.text_elem_content ? JSON.parse(info.text_elem_content)||'' : '' // openDialog(data, false);
// // // }
// //console.log('msgData->', msgData); // })
// if (msgData.msgKey == "finishHomework"){ // })
// // // }
// const data = JSON.parse(localStorage.getItem('teachClassWorkItem')); // break
// //console.log('data->', data); }
// openDialog(data, false);
// }
// })
// })
// }
// break
} }
} }