|
@@ -1907,8 +1907,12 @@ const checkParentMode = () => {
|
|
}
|
|
}
|
|
|
|
|
|
const forceLogout = () => {
|
|
const forceLogout = () => {
|
|
|
|
+ sendMessage({ type: 'logout' })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const logout = () => {
|
|
// @ts-ignore
|
|
// @ts-ignore
|
|
- if (window.parent && typeof window.parent.topU.U.MD.U.LO.logoutSystemQ === 'function' && props.type == '2') {
|
|
|
|
|
|
+ if (window.parent && typeof window.parent.topU.U.MD.U.LO.logoutSystemQ === 'function') {
|
|
// @ts-ignore
|
|
// @ts-ignore
|
|
window.parent.topU.U.MD.U.LO.logoutSystemQ()
|
|
window.parent.topU.U.MD.U.LO.logoutSystemQ()
|
|
}
|
|
}
|
|
@@ -1979,6 +1983,10 @@ const getMessages = (msgObj: any) => {
|
|
selectCourseSLook()
|
|
selectCourseSLook()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (props.type == '2' && msgObj.type === 'logout') {
|
|
|
|
+ logout()
|
|
|
|
+ }
|
|
|
|
+
|
|
// 处理作业提交消息 - 当有人提交作业时,重新获取作业数据
|
|
// 处理作业提交消息 - 当有人提交作业时,重新获取作业数据
|
|
if (props.type == '1' && msgObj.type === 'homework_submitted' && msgObj.courseid === props.courseid) {
|
|
if (props.type == '1' && msgObj.type === 'homework_submitted' && msgObj.courseid === props.courseid) {
|
|
console.log('收到作业提交消息,重新获取作业数据')
|
|
console.log('收到作业提交消息,重新获取作业数据')
|