12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
- <div id="privacy" :class="{ app: true, block: type === 1 }">
- <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: "",
- type: undefined
- };
- },
- methods: {
- onClickLeft() {
- history.go(-1);
- }
- },
- mounted() {
- let _this = this;
- window.privacy = function(html) {
- _this.content = html;
- };
- this.$pageParams = currentUrlToParams();
- this.type = this.$pageParams.pattern - 0;
- },
- 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>
|