From db8be67cbc0b45fb769fd1d138c09f90fbc4563a Mon Sep 17 00:00:00 2001 From: lishenfeng Date: Thu, 12 Jun 2025 15:17:12 +0800 Subject: [PATCH] =?UTF-8?q?feat():=20=E5=A4=A9=E6=B0=94=E9=A2=84=E6=8A=A5?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/_/shqxjs.js | 50 ++++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/src/models/_/shqxjs.js b/src/models/_/shqxjs.js index 0e0c72f..46d9f47 100644 --- a/src/models/_/shqxjs.js +++ b/src/models/_/shqxjs.js @@ -18,16 +18,22 @@ export const WeatherSet24h = new CachePromise( if (!latest) { return null; } - - return httpget(apiurl.yjhis.weather, { - filename: latest.rainFile, - x1: config.extent[0], - y1: config.extent[1], - x2: config.extent[2], - y2: config.extent[3], - layers: '00.24,00.01,01.01,02.01,03.01,04.01,05.01,06.01,07.01,08.01,09.01,10.01,11.01,12.01,13.01,14.01,15.01,16.01,17.01,18.01,19.01,20.01,21.01,22.01,23.01,24.01' - }).then(({ data }) => data) + return fetch(`${process.env.PUBLIC_URL}/data2/shqxResGrblayerset.json`) + .then((response) => response.json()) + .then(( data ) => { + return data + }) .catch(() => null) + + // return httpget(apiurl.yjhis.weather, { + // filename: latest.rainFile, + // x1: config.extent[0], + // y1: config.extent[1], + // x2: config.extent[2], + // y2: config.extent[3], + // layers: '00.24,00.01,01.01,02.01,03.01,04.01,05.01,06.01,07.01,08.01,09.01,10.01,11.01,12.01,13.01,14.01,15.01,16.01,17.01,18.01,19.01,20.01,21.01,22.01,23.01,24.01' + // }).then(({ data }) => data) + // .catch(() => null) }, 1000 * 60 ); @@ -46,14 +52,26 @@ export const WeatherRadar = new CachePromise( return null; } - return httpget(apiurl.radarhis.weather, { - filename: latest.rainFile, - x1: config.extent[0], - y1: config.extent[1], - x2: config.extent[2], - y2: config.extent[3], - }).then(({ data }) => data) + + return fetch(`${process.env.PUBLIC_URL}/data2/shqxResRadarlayer.json`) + .then((response) => response.json()) + .then(( data ) => { + return data + }) .catch(() => null) + + // return httpget(apiurl.radarhis.weather, { + // filename: latest.rainFile, + // x1: config.extent[0], + // y1: config.extent[1], + // x2: config.extent[2], + // y2: config.extent[3], + // }).then(({ data }) => { + // console.log("133344",data); + + // return data + // }) + // .catch(() => null) }, 1000 * 60 );