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