reportRevolve.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <view class="container reportRevolve-container">
  3. <web-view :src="reportUrl" v-if="reportUrl"> </web-view>
  4. <!-- <cover-view class="clear-view">
  5. <cover-image class="clear-icon" @click="isClearHandler" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/close-icon.png"></cover-image>
  6. </cover-view> -->
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. data() {
  12. return {
  13. reportUrl: "",
  14. };
  15. },
  16. methods: {
  17. isClearHandler() {
  18. uni.navigateBack();
  19. },
  20. },
  21. onLoad(option) {
  22. const eventChannel = this.getOpenerEventChannel();
  23. // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
  24. eventChannel.on("acceptDataFromOpenerPage", ({ url }) => {
  25. this.reportUrl = JSON.parse(decodeURIComponent(url));
  26. });
  27. },
  28. };
  29. </script>
  30. <style lang="scss" scoped>
  31. .reportRevolve-container {
  32. .clear-view {
  33. position: fixed;
  34. width: 100%;
  35. height: 60rpx;
  36. z-index: 99999;
  37. font-size: 24rpx;
  38. box-sizing: border-box;
  39. left: 80rpx;
  40. top: 16rpx;
  41. .clear-icon {
  42. width: 20rpx;
  43. height: 20rpx;
  44. z-index: 99999;
  45. }
  46. }
  47. // padding-bottom: 200rpx;
  48. // padding-bottom: calc(200rpx + constant(safe-area-inset-bottom));
  49. // padding-bottom: calc(200rpx + env(safe-area-inset-bottom));
  50. }
  51. </style>