| | |
| | | <div v-else> |
| | | <div class="description" v-html="query.Description"></div> |
| | | </div> |
| | | |
| | | |
| | | <img |
| | | src="http://122.51.217.202/files/tools/8a597533-f35e-49a1-9384-4fc2c52d8153.png?timestamp=1735208676&nonce=189303a6da47c362c847c562d32fde76&sign=Fps9KCv73N6DeW9DaZfo8fe1xeRqJve2szObZxpxL7o=" |
| | | alt=""> |
| | | <div class="chat-list"> |
| | | <div class="chat-list-item" v-for="(item, index) in historyList" :key="item.Id"> |
| | | <div class="chat-list-item-content" |
| | |
| | | Message: this.newMessage, |
| | | isAnswer: false, |
| | | copyMessage: this.newMessage, |
| | | id:res.data.Data.UserId |
| | | id: res.data.Data.UserId |
| | | }); |
| | | // console.log('res.data.Data===========',res.data.Data); |
| | | this.newMessage = ''; |
| | | this.loading = false; // 结束加载 |
| | | this.total = res.data.Data.Count; |
| | | this.loadingSub = false; |
| | | // 判断是否包含 .png 字段 |
| | | if (res.data.Data.Data.includes(".png")) { |
| | | // 使用正则表达式提取图片 URL |
| | | const regex = /!\[.*?\]\((.*?\.png.*?)\)/; |
| | | const match = res.data.Data.Data.match(regex); |
| | | |
| | | if (match && match[1]) { |
| | | const imageUrl = match[1]; // 提取到的图片 URL |
| | | const baseUrl = "http://122.51.217.202"; // 基础 URL |
| | | const fullImageUrl = `${baseUrl}${imageUrl}`; // 拼接完整 URL |
| | | |
| | | // 生成 <img> 标签 |
| | | const imgTag = `<img src="${fullImageUrl}" alt="报告图片">`; |
| | | // 替换原数据中的图片部分为汉字 + 图片标签 |
| | | res.data.Data.Data = res.data.Data.Data.replace(regex, `${imgTag}`); |
| | | console.log(imgTag); // 输出结果 |
| | | } else { |
| | | console.log("未找到有效的图片 URL"); |
| | | } |
| | | } else { |
| | | console.log("数据中不包含 .png 字段"); |
| | | } |
| | | // this.typeWriterEffect('系统', this.formatMessage(res.data.choices[0].message.content), true, res.data.AssistantId, res.data.choices[0].message.content); |
| | | this.typeWriterEffect('系统', this.formatMessage(res.data.Data.Data), true, res.data.Data.AssistantId, res.data.Data.Data); |
| | | |