<template>
  <div id="branchIntroduction" :class="{ app: true, block: type === 1 }">
    <div class="sk" v-if="!content">
      <van-skeleton title avatar :row="15" />
    </div>
    <news v-if="content" :item="{ content: content }" />
  </div>
</template>

<script>
import news from "@/components/Detail/news.vue";

import { currentUrlToParams } from "@/utils/common.js";
import { Skeleton as vanSkeleton } from "vant";
import "vant/lib/skeleton/style";
export default {
  name: "app",
  data: function() {
    return {
      content: "",
      type: undefined
    };
  },
  methods: {},
  mounted() {
    let _this = this;
    this.$pageParams = currentUrlToParams();
    this.type = this.$pageParams.pattern - 0;
    window.branchIntroduction = function(html) {
      _this.content = html;
    };
  },
  beforeDestroy: function() {},
  components: { news, vanSkeleton }
};
</script>
<style lang="scss">
#branchIntroduction {
  height: 100%;
  overflow-y: scroll;
}
</style>
