丸子 il y a 10 mois
Parent
commit
9cf12fd668
1 fichiers modifiés avec 3 ajouts et 18 suppressions
  1. 3 18
      src/views/AIPainting.vue

+ 3 - 18
src/views/AIPainting.vue

@@ -135,10 +135,11 @@ const inputMessage = ref('')
 const sendMessage = () => {
   if (inputMessage.value.trim()) {
     // messages.value.push(inputMessage.value.trim())
-    inputMessage.value = ''
+ 
 
     let content = inputMessage.value.trim()
     console.log('-------', content)
+       inputMessage.value = ''
     content = '给我一个小妖怪'
     console.log('-------', content)
 
@@ -203,7 +204,6 @@ const refreshWatchImages = async () => {
   const list = await PaintingGetMys(imageIds)
   console.log('轮询生成中的 image 列表', list)
   const newWatchImages = {}
-
   // 添加空值检查
   if (list.data) {
     list.data.forEach(image => {
@@ -218,27 +218,12 @@ const refreshWatchImages = async () => {
         imageAllList.value.push({
           type: 'ai',
           content: '已为您生成图片:',
-          imageList: image.picUrl
+          imageList:image.picUrl
         })
         // }
       }
     })
   }
-  console.log('================', imageAllList)
-
-  list.data.forEach((image) => {
-    if (image.status === AiImageStatusEnum.IN_PROGRESS) {
-      newWatchImages[image.id] = image
-    } else {
-
-      imageAllList.value.pop();
-      imageAllList.value.push({
-        type: 'ai',
-        content: "已为您生成图片:",
-        imageList: image.picUrl,
-      })
-    }
-  })
   console.log("================",imageAllList)
   inProgressImageMap.value = newWatchImages
 }