Commit a78b6a11 authored by mhw's avatar mhw

--

parent f6417bf3
......@@ -167,7 +167,6 @@ export default {
let temporary = JSON.parse(`[${data}]`.replace(/}{/g, '},{'))
console.log(temporary);
temporary.forEach((item) => {
this.modifyContent(item)// 修改返回内容
nowChat.excludeReferenceAnswer += item.answer || '' // 排除回答中的引用内容
nowChat.answer += item.answer || '\n' + item.docs
})
......@@ -180,7 +179,7 @@ export default {
modifyContent (item) { // 修改返回内容
if (item.docs) {
item.docs = item.docs.map((item2) => {
let tagUrl = item2.match(/\]\((.*?)\)/g)[0].slice(2, -1)
let tagUrl = item2?.match(/\]\((.*?)\)/g)[0].slice(2, -1)
let url = ''
if (tagUrl.indexOf('https') !== -1) {
url = tagUrl.replace(/^https:\/\/[^/]+\//, `https://${window.location.hostname}:${window.location.port}/`);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment