liuyg
2022-03-31 4dab9528d8e69c0c3f8ce03a7d4617bb13ecec8d
src/components/mobileActivity/index.vue
@@ -156,6 +156,7 @@
    //       this.height = this.useHeight;
    //     }
    //   },
    //当弹窗显示时,开始操作数据
    showActivity() {
      if (this.showActivity) {
        this.inToInit(); // 初始化
@@ -223,6 +224,7 @@
          //     }
          //   }
          // }
          //处理底图
          window.serviceMapSee = {};
          getdetail(this.showActivityData.opendata.id).then((res) => {
            let name = res.data.data.mapname.split(",");
@@ -239,7 +241,7 @@
                url: url[k],
                to: "serviceMap",
              };
              this.serviceMap.push(d);
              this.serviceMap.push(d); //数据层
              // console.log(d, "see");
              window.onceServiceMap =
@@ -250,8 +252,8 @@
                flag: true,
                layer: global.viewer.imageryLayers.addImageryProvider(
                  window.onceServiceMap
                ),
                source: window.onceServiceMap,
                ), //渲染层
                source: window.onceServiceMap, //渲染源
              };
              window.onceServiceMap = null;
            }
@@ -349,6 +351,7 @@
        item.img = item.normal;
      }
      if (item.to == "serviceMap") {
        //再次判断是否是底图的加载
        console.log(window.serviceMapSee[item.layer]);
        //清除
        if (!item.flag && window.serviceMapSee[item.layer].flag) {