<template>
  <view class="container reportRevolve-container">
    <web-view :src="reportUrl" v-if="reportUrl"> </web-view>
    <!-- <cover-view class="clear-view">
        <cover-image class="clear-icon" @click="isClearHandler" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/close-icon.png"></cover-image>
      </cover-view> -->
  </view>
</template>

<script>
export default {
  data() {
    return {
      reportUrl: "",
    };
  },
  methods: {
    isClearHandler() {
      uni.navigateBack();
    },
  },
  onLoad(option) {
    const eventChannel = this.getOpenerEventChannel();
    // 监听acceptDataFromOpenerPage事件，获取上一页面通过eventChannel传送到当前页面的数据
    eventChannel.on("acceptDataFromOpenerPage", ({ url }) => {
      this.reportUrl = JSON.parse(decodeURIComponent(url));
    });
  },
};
</script>

<style lang="scss" scoped>
.reportRevolve-container {
  .clear-view {
    position: fixed;
    width: 100%;
    height: 60rpx;
    z-index: 99999;
    font-size: 24rpx;
    box-sizing: border-box;
    left: 80rpx;
    top: 16rpx;
    .clear-icon {
      width: 20rpx;
      height: 20rpx;
      z-index: 99999;
    }
  }
  //   padding-bottom: 200rpx;
  //   padding-bottom: calc(200rpx + constant(safe-area-inset-bottom));
  //   padding-bottom: calc(200rpx + env(safe-area-inset-bottom));
}
</style>
