神仙都没用 1 年之前
父節點
當前提交
4fa777159a
共有 2 個文件被更改,包括 14 次插入2 次删除
  1. 14 2
      build/cool/eps/index.ts
  2. 0 0
      stats.html

+ 14 - 2
build/cool/eps/index.ts

@@ -55,9 +55,10 @@ async function getData(temps: any[]) {
 		error(`[eps] ${join(DistPath, "eps.json")} 文件异常, ${err.message}`);
 	}
 
-	// 远程数据
+	// 远程地址
 	const url = proxy["/dev/"].target + "/admin/base/open/eps";
 
+	// 请求数据
 	await axios
 		.get(url, {
 			timeout: 5000
@@ -78,7 +79,18 @@ async function getData(temps: any[]) {
 			error(`[eps] 获取失败, ${url} 无法访问!`);
 		});
 
-	return [...list, ...temps];
+	// 判断是否重复项
+	if (isArray(temps)) {
+		temps.forEach((e) => {
+			const d = list.find((a) => e.prefix === a.prefix);
+
+			if (!d) {
+				list.push(e);
+			}
+		});
+	}
+
+	return list;
 }
 
 // 创建数据文件

File diff suppressed because it is too large
+ 0 - 0
stats.html


Some files were not shown because too many files changed in this diff