mirror of
				https://github.com/yangjian102621/geekai.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	文档对话不显示文档列表的 bug
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
				
			|||||||
# 前端 Vue 项目构建
 | 
					# 前端 Vue 项目构建
 | 
				
			||||||
FROM registry.cn-shenzhen.aliyuncs.com/geekmaster/nginx:latest
 | 
					FROM registry.cn-hangzhou.aliyuncs.com/geekmaster/nginx:1.20.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MAINTAINER yangjian<yangjian102621@163.com>
 | 
					MAINTAINER yangjian<yangjian102621@163.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
# 前端 Vue 项目构建
 | 
					# 前端 Vue 项目构建
 | 
				
			||||||
FROM registry.cn-hangzhou.aliyuncs.com/geekmaster/nginx:1.20.2
 | 
					FROM registry.cn-shenzhen.aliyuncs.com/geekmaster/nginx:latest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MAINTAINER yangjian<yangjian102621@163.com>
 | 
					MAINTAINER yangjian<yangjian102621@163.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -142,20 +142,30 @@ const processFiles = () => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  const linkRegex = /(https?:\/\/\S+)/g;
 | 
					  const linkRegex = /(https?:\/\/\S+)/g;
 | 
				
			||||||
  const links = props.data.content.match(linkRegex);
 | 
					  const links = props.data.content.match(linkRegex);
 | 
				
			||||||
 | 
					  const urlPrefix = `${window.location.protocol}//${window.location.host}`;
 | 
				
			||||||
  if (links) {
 | 
					  if (links) {
 | 
				
			||||||
    httpPost("/api/upload/list", {urls: links}).then(res => {
 | 
					    const _links = links.map((link) => {
 | 
				
			||||||
      files.value = res.data.items
 | 
					      if (link.startsWith(urlPrefix)) {
 | 
				
			||||||
 | 
					        return link.replace(urlPrefix, "");
 | 
				
			||||||
      for (let link of links) {
 | 
					 | 
				
			||||||
        if (isExternalImg(link, files.value)) {
 | 
					 | 
				
			||||||
          files.value.push({url:link, ext: ".png"})
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }).catch(() => {
 | 
					      return link;
 | 
				
			||||||
    })
 | 
					    });
 | 
				
			||||||
 | 
					    // 合并数组并去重
 | 
				
			||||||
 | 
					    const urls = [...new Set([...links, ..._links])];
 | 
				
			||||||
 | 
					    httpPost("/api/upload/list", { urls: urls })
 | 
				
			||||||
 | 
					        .then((res) => {
 | 
				
			||||||
 | 
					          files.value = res.data.items;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          for (let link of links) {
 | 
				
			||||||
 | 
					            if (isExternalImg(link, files.value)) {
 | 
				
			||||||
 | 
					              files.value.push({ url: link, ext: ".png" });
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (let link of links) {
 | 
					    for (let link of links) {
 | 
				
			||||||
      content.value = content.value.replace(link,"")
 | 
					      content.value = content.value.replace(link, "");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user