<template>
  <div id="privacy" class="app">
    <div class="sk" v-if="!content">
      <br />
      <van-skeleton title :row="10" />
    </div>
    <news v-if="content" :item="{ content: content }" />
  </div>
</template>

<script>
import { Skeleton as vanSkeleton } from "vant";
import { currentUrlToParams } from "@/utils/common.js";
import "vant/lib/skeleton/style";
import news from "@/components/Detail/news.vue";

export default {
  name: "app",
  data: function() {
    return {
      content: ""
    };
  },
  methods: {
    onClickLeft() {
      history.go(-1);
    }
  },
  mounted() {
    window.$privacy = function(html) {
      this.content = html;
    };
    this.$pageParams = currentUrlToParams();
  },
  beforeDestroy: function() {},
  components: { news, vanSkeleton }
};
</script>
<style lang="scss">
#privacy {
  height: 100%;
  overflow-y: scroll;
  .head {
    text-align: center;
    padding-bottom: 1em;
    padding-top: 0.5rem;
    .van-image {
      margin: 0 auto;
    }
  }
}
</style>
