Przeglądaj źródła

百色果园信息

shuhao 1 dzień temu
rodzic
commit
9718035ead

+ 4 - 0
src/api/modules/miniimage.js

@@ -10,4 +10,8 @@ module.exports = {
         url: config.base_dev_url + "lz_weather7d/getByFarmIdAndDate/{farmId}/{date}?key="+config.mini_key,
         type: "get",
     },
+    findSuitabilityByPoint: {
+        url: config.base_dev_url + "lz_weather7d/findSuitabilityByPoint/{farmId}/{date}?key="+config.mini_key,
+        type: "get",
+    },
 }

+ 13 - 12
src/views/home/album_compoents/albumDrawBox.vue

@@ -55,7 +55,7 @@ let ctx = null;
 let data = {year:props.photo.uploadDate.substring(0,4),
   monthDay:dateFormat(new Date(props.photo.uploadDate),'mm/dd'),
   address:props.photo.district.replaceAll("\"","") + props.photo.gardenName,
-  tempImg:imageCache.get("temp"),temp:"10°C-20°C",wendu:"适宜",
+  tempImg:imageCache.get("temp"),temp:"10°C-20°C适宜",
   feiniao:imageCache.get("feiniao"),
   baseMap:imageCache.get("base_map_"+props.photo.treeId),
   fusheImg:imageCache.get("fushe"),fushe:"光照优",
@@ -74,16 +74,17 @@ async function drawWatermark(event) {
   if(!watermark.value){
     let param = {farmId:props.farmId, date: props.photo.uploadDate}
     let weather = null
-    VE_API.image.findSuitabilityByPoint(param).then((res)=>{
-      if(res.code === 0){
-        weather = res.data
-        drawWatermark2(img,weather)
-      }else{
-        drawWatermark2(img,null)
-      }
-    }).catch((err)=>{
-      console.error(err)
-    })
+    // VE_API.miniimage.findSuitabilityByPoint(param).then((res)=>{
+    //   if(res.code === 0){
+    //     weather = res.data
+    //     drawWatermark2(img,weather)
+    //   }else{
+    //     drawWatermark2(img,null)
+    //   }
+    // }).catch((err)=>{
+    //   console.error(err)
+    // })
+    drawWatermark2(img,null)
   }
 }
 
@@ -145,7 +146,7 @@ const drawBottom = (imgWidth, imgHeight, weather) => {
 }
 
 
-const showTagBox = ref(true); // 控制 tag-box 的显示状态
+const showTagBox = ref(false); // 控制 tag-box 的显示状态
 const hideTagBox = (event) => {
   event.stopPropagation();
   showTagBox.value = false; // 隐藏 tag-box

+ 2 - 0
src/views/home/album_compoents/cacheImg.js

@@ -23,6 +23,8 @@ function loadImage(url, key) {
         img.onerror = (error) => {
             reject(error);
         };
+    }).catch((error) => {
+         console.error('图片加载失败', error);
     });
 }
 

+ 1 - 1
src/views/home/map/samplePointLayer.js

@@ -36,7 +36,6 @@ class SamplePointLayer {
 
     this.treeClusterLayer = new KMap.VectorLayer("tree-cluster",999,{
       minZoom:15,
-      source:this.clusterSource,
       style:(f)=> this.getStyle(f)})
     this.yellowBlockLayer = new KMap.VectorLayer("yellow-block",999,{
       minZoom:15,
@@ -107,6 +106,7 @@ class SamplePointLayer {
           features: features,
         });
         that.clusterSource.setSource(source)
+        that.treeClusterLayer.layer.setSource(that.clusterSource)
       }
     })
   }