src/pages/exhibition.vue
@@ -41,7 +41,8 @@ screenTitleBg: null, screenBg: null, isHeader: true, isNow: true isNow: true, state: 1, } }, mounted() { @@ -110,6 +111,24 @@ }, 0) }) window.addEventListener("message", (msg) => { // 处理数据 this.state = msg.data.state if (this.state == 1) { this.modularArr.map(item => { if (item.postData) { item.postData() } }) } else if (this.state == 0) { this.modularArr.map(item => { if (item.outClear) { item.outClear() } }) } }); } }).catch((err) => { console.log(err)