|
@@ -173,6 +173,7 @@ export default {
|
|
|
this.initSystemInfo();
|
|
|
}
|
|
|
// this.getData();
|
|
|
+ // this.test();
|
|
|
},
|
|
|
|
|
|
unmounted() {
|
|
@@ -189,18 +190,23 @@ export default {
|
|
|
|
|
|
methods: {
|
|
|
test() {
|
|
|
- axios.post("http://localhost:3000/api/getWeather", {
|
|
|
- longitude: 106.169866,
|
|
|
- latitude: 38.46637,
|
|
|
- level: "surface",
|
|
|
- variable: "PRATE,PRES,SUNSD,VEG,VIS,VRATE,LCDC",
|
|
|
- });
|
|
|
+ axios
|
|
|
+ // .get("http://localhost:3007/api/test", {
|
|
|
+ .post("http://localhost:3007/weather/getAreaWeatherData", {
|
|
|
+ longitude: 106.169866,
|
|
|
+ latitude: 38.46637,
|
|
|
+ level: "surface",
|
|
|
+ variable: "PRATE,PRES,SUNSD,VEG,VIS,VRATE,LCDC",
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ console.log(11111, res.data);
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
getData() {
|
|
|
- getWWTempData().then(res =>{
|
|
|
- console.log("res===>>>", res)
|
|
|
- })
|
|
|
+ getWWTempData().then((res) => {
|
|
|
+ console.log("res===>>>", res);
|
|
|
+ });
|
|
|
},
|
|
|
// 初始化一些监听事件
|
|
|
initEventListener() {
|
|
@@ -939,8 +945,11 @@ export default {
|
|
|
//调用云层底图
|
|
|
const cloudLayer = this.viewer.imageryLayers.addImageryProvider(
|
|
|
new Cesium.UrlTemplateImageryProvider({
|
|
|
- url: "https://tile.openweathermap.org/map/clouds_new/{z}/{x}/{y}.png?appid=3b66d35579770393051599f8d518df4a",
|
|
|
+ // url: "https://tile.openweathermap.org/map/clouds_new/{z}/{x}/{y}.png?appid=3b66d35579770393051599f8d518df4a",
|
|
|
+ url: "http://localhost:3007/tiles/cloud/{z}/{x}/{y}",
|
|
|
credit: "云层影像地图",
|
|
|
+ minimumLevel: 2,
|
|
|
+ maximumLevel: 5,
|
|
|
})
|
|
|
);
|
|
|
|
|
@@ -950,7 +959,7 @@ export default {
|
|
|
cloudLayer.contrast = 1; // 对比度
|
|
|
|
|
|
this.cloudLayer = cloudLayer;
|
|
|
- this.resetViewport1()
|
|
|
+ this.resetViewport1();
|
|
|
},
|
|
|
//显示降雨图
|
|
|
showRainLayer() {
|
|
@@ -977,7 +986,7 @@ export default {
|
|
|
this.viewer.imageryLayers.addImageryProvider(rainLayer);
|
|
|
this.csceneElliposid(this.viewer, "rain");
|
|
|
this.rainLayer = rainLayer;
|
|
|
- this.resetViewport1()
|
|
|
+ this.resetViewport1();
|
|
|
},
|
|
|
|
|
|
showTemperatureLayer() {
|