src/api/trApi.js
@@ -92,9 +92,10 @@ } // 通过接口去请求json,将请求的json解析获取泥石流参数 export async function fetchWaterSimulationData() { export async function fetchWaterSimulationData(serviceInfo) { try { const response = await fetch("/simu/20250515111549/layer.json"); // 发起请求 const response = await fetch(`/simu/${serviceInfo}/layer.json`); // 发起请求 // const response = await fetch(`/simu/c2h1dc/layer.json`); // 发起请求 if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); }