ZZJ
2021-10-13 878ce80ef3ca88a2c108fbc713cd6ea461c44de1
src/pages/desktop/index/App.vue
@@ -80,18 +80,9 @@
        this.$refs.desktop.validateSn()
      }
      if (e.data.msg === 'changeColor') {
        /* this.$store.state.desktop.minDocks.forEach(item=>{
          console.log(window.location.host);
          console.log(item.url);
         // window.postMessage(e.data.color,`${window.location.host}${item.url}`)
         // window.postMessage(e.data.color,"http://localhost:8080/view/vindicate/")
        }) */
        const iframeArr = document.querySelectorAll("iframe")
        console.log(iframeArr);
        iframeArr.forEach(item=>{
          console.log(item);
          item.contentWindow.postMessage({msg:'changeColor',color:e.data.color},"*")
        })
      }
    });