src/utils/healthCheck.js
@@ -6,7 +6,7 @@ healthPath: "/Health", }, { name: "API_INNER", name: "API_OUTER", baseUrl: process.env.VUE_APP_BASE_API, // 外网地址 healthPath: "/Health", }, @@ -53,8 +53,8 @@ const healthCheckPromises = serviceList.map((item) => { return checkServiceHealth(item) }); const healthResult = await Promise.race(healthCheckPromises); // 竞速模式,检测到健康的链接就立刻返回 // 筛选可用的 baseUrl(取第一个有效地址) const healthResult = await Promise.any(healthCheckPromises); // 检测到健康的链接就立刻返回 // 筛选可用的 baseUrl const availableBaseUrl = healthResult if (availableBaseUrl) {