Przeglądaj źródła

增加图片展示

wang_xy 2 lat temu
rodzic
commit
f2722e8793
1 zmienionych plików z 18 dodań i 18 usunięć
  1. 18 18
      src/views/forest.vue

+ 18 - 18
src/views/forest.vue

@@ -962,15 +962,15 @@ export default {
               '                </div>' +
               '                </div>' +
               '                </span>';
-            // if (res.data[i].pictureType == 'image' && res.data[i].picturePath != null && res.data[i].picturePath != '') {
-            //   markersMap.bindPopupHtml += '<span>' +
-            //     '                  <div class="d-l-con">' +
-            //     '                  <div class="d-l-l-text">' +
-            //     '<img src="' + res.data[i].picturePath + '" style="width: 150px;height: 100px"/>' +
-            //     '                </div>' +
-            //     '                </div>' +
-            //     '                </span>'
-            // }
+            if (res.data[i].pictureType == 'image' && res.data[i].picturePath != null && res.data[i].picturePath != '') {
+              markersMap.bindPopupHtml += '<span>' +
+                '                  <div class="d-l-con">' +
+                '                  <div class="d-l-l-text">' +
+                '<img src="' + res.data[i].picturePath + '" style="width: 150px;height: 100px"/>' +
+                '                </div>' +
+                '                </div>' +
+                '                </span>'
+            }
             markersMap.bindPopupHtml += '</div>'
             that.markersList.push(markersMap)
           }
@@ -1124,15 +1124,15 @@ export default {
         '                </div>' +
         '                </div>' +
         '                </span>';
-      // if (event.pictureType == 'image' && event.picturePath != null && event.picturePath != '') {
-      //   markersMap.bindPopupHtml += '<span>' +
-      //     '                  <div class="d-l-con">' +
-      //     '                  <div class="d-l-l-text">' +
-      //     '<img src="' + event.picturePath + '" style="width: 150px;height: 100px"/>' +
-      //     '                </div>' +
-      //     '                </div>' +
-      //     '                </span>'
-      // }
+      if (event.pictureType == 'image' && event.picturePath != null && event.picturePath != '') {
+        markersMap.bindPopupHtml += '<span>' +
+          '                  <div class="d-l-con">' +
+          '                  <div class="d-l-l-text">' +
+          '<img src="' + event.picturePath + '" style="width: 150px;height: 100px"/>' +
+          '                </div>' +
+          '                </div>' +
+          '                </span>'
+      }
       markersMap.bindPopupHtml += '</div>'
       that.markersList.push(markersMap)
       setTimeout(() => {