lsc 3 周之前
父節點
當前提交
8684cf768b
共有 1 個文件被更改,包括 10 次插入13 次删除
  1. 10 13
      src/views/Student/index.vue

+ 10 - 13
src/views/Student/index.vue

@@ -1043,20 +1043,17 @@ const handleHomeworkSubmit = async () => {
 
             // 支持同步和异步submitWork
             const result = await iframeWindow.submitWork(...submitArgs)
-            if (result instanceof Promise) {
-              await result
-              console.log('submitWork同步执行完成')
-              message.success('作业提交成功')
-              hasSubmitWork = true
+            console.log('submitWork同步执行完成')
+            message.success('作业提交成功')
+            hasSubmitWork = true
             
-              // 发送作业提交成功的socket消息
-              sendMessage({
-                type: 'homework_submitted',
-                courseid: props.courseid,
-                slideIndex: slideIndex.value,
-                userid: props.userid
-              })
-            } 
+            // 发送作业提交成功的socket消息
+            sendMessage({
+              type: 'homework_submitted',
+              courseid: props.courseid,
+              slideIndex: slideIndex.value,
+              userid: props.userid
+            })
 
 
             break