Просмотр исходного кода

Merge branch 'wanzi' of http://59.110.91.129:3000/zhangmengying/AIClass into wanzi

丸子 8 месяцев назад
Родитель
Сommit
5869fdcd70
2 измененных файлов с 6 добавлено и 5 удалено
  1. 1 1
      src/components/videopage/DialogComponents.vue
  2. 5 4
      src/views/AIQuestions.vue

+ 1 - 1
src/components/videopage/DialogComponents.vue

@@ -174,7 +174,7 @@ const handleCloseQuestionDialog = () => {
 
 // 提交答案
 const handleSubmitAnswer = () => {
-  if (!selectedOption.value) {
+  if (props.currentQuestion.ccQuestOption && props.currentQuestion.ccQuestOption.length > 0 && !selectedOption.value) {
     ElMessage.warning('请选择一个选项')
     return
   }

+ 5 - 4
src/views/AIQuestions.vue

@@ -349,14 +349,15 @@ const doSendMessageStream = async (userMessage) => {
           console.log(`对话异常! ${msg}`);
           return;
         }
-        // 如果内容为空,就不处理。
-        // if (data.receive?.content === '') {
-        //   return
-        // }
 
         // 根据事件类型处理
         if (data.eventType === 'TEXT') {
 
+          // 如果内容为空,就不处理。
+          if (data.receive?.content === '') {
+            return
+          }
+
           // 处理文本消息
           receiveMessageFullText.value += data.receive.content;