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 );