2 Комити e22d29b0c8 ... 7d73409be5

Аутор SHA1 Порука Датум
  Koishi 7d73409be5 合并冲突 пре 3 недеља
  Koishi f7c80804f1 常规上传 пре 3 недеља
2 измењених фајлова са 21 додато и 12 уклоњено
  1. BIN
      public/static/image/output.png
  2. 21 12
      src/views/cesium.vue

BIN
public/static/image/output.png


+ 21 - 12
src/views/cesium.vue

@@ -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() {