123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- /**
- * Created by Administrator on 2017/11/6.
- */
- define([''], function () {
- return http = {
- serverUrl: onemapUrlConfig.meteoUrl + '/earth-apis/', //服务路径
- markerUrl: onemapUrlConfig.siteUrl + "/images/meteo/", //marker点图片所使用的绝对路径
- myImageUrlJs: "images/meteo/",
- //-------------------------站点数据---------------------
- station: 'stations', //站点查询(可传中英文或站号)
- //-----------------------地面站------------------------
- stationInfo: 'stations/weather-real', //(气象)站点数据(加站号为单站数据)
- stationReal: 'stations/weather-real/surfseq', //站点实况(变化曲线)
- stationFcst: 'stations/weather-fcst/hourseq', //站点预报(3小时
- stationFcstDay: 'stations/weather-fcst/dayseq', //站点预报(天
- //-----------------------5000站点------------------------------
- stationG: 'global/stations', //国外5000站点实况(分布图)
- stationGInfo: 'global/real', //国外站点单站实况
- stationGReal: 'global/surfseq', //国外站点单站实况(变化曲线)
- stationGFcst: 'global/fcstseq', //国外站点单站预报(变化曲线)
- //------------------------amsu站--------------------------------
- amsu: 'amsu', //站点实况(分布图)
- amsuInfo: 'amsu', //站点实况
- amsuReal: 'amsu/amsuseq', //单站实况(变化曲线)
- amsuFcst: '', //单站预报(变化曲线)
- //-------------------------自动站--------------------------
- aws: 'aws', //自动站(分布图
- awsInfo: 'aws', //自动站(分布图
- awsReal: 'aws/hourseq', //自动站实况(变0化曲线
- //---------------------------机场--------------------------
- airportIndex: 'sasp', //机场分布图
- airportInfo: 'sasp', //机场实况
- //----------------------------船舶报----------------------------
- ship: 'ship',
- shipInfo: 'ship',
- //-------------------------799--------------------
- tIsoLine: 'T799/isoline', //799等值线
- tImage: 'T799/images', //799等值线
- tData: 'T799/data', //799等值线
- //-----------------------热带气旋--------------------------
- typhIndex: 'typhs', //台风列表
- typhInfo: 'typhs/info', //台风详情
- //-------------------------海洋环境-----------------------------
- oceanImage: 'ocean/images', //海洋填充图
- oceanIsoLine: 'ocean/isoline', //海洋等值线
- oceanData: 'ocean/data', //海洋数据(海流速度/方向
- oceanC: 'ocean/wave/isoline', //海浪高度数据
- oceanCI: 'ocean/wave/images', //海浪高度图片
- oceanD: 'ocean/dirmndata', //海浪方向
- //--------------------------云图-----------------------------
- cloud: 'clouds/images',
- //-------------------------空间天气----------------------------
- space: 'space',
- spaceInfo: 'space/info', //空间天气详情
- httpFunction: function (url, par, params, callback, errorBack) {
- var myUrl = http.serverUrl + url;
- myUrl = par ? myUrl + "/" + par : myUrl;
- var uuid = new Date().getTime();
- if (myUrl.indexOf("?") != -1) {
- myUrl += "&uuid=" + uuid;
- } else {
- myUrl += "?uuid=" + uuid;
- }
- $.ajax({
- url: myUrl,
- dataType: 'JSON',
- data: params,
- success: function (json) {
- callback ? callback(json) : null;
- },
- error: function (e) {
- errorBack ? errorBack() : null;
- }
- })
- },
- getLocalJson: function (url, callback) {
- var LocalJson = "scripts/meteo/test/";
- $.get(LocalJson + url).success(function (json) {
- if (url.indexOf(".json") == -1) {
- json = JSON.parse(json);
- }
- callback ? callback(json) : null;
- });
- }
- }
- })
|