<template>
  <div id="special" class="app">
    <van-sticky :offset-top="0">
      <van-nav-bar
        left-text="返回"
        left-arrow
        @click-left="goBack"
        :title="dataInfo.name"
      />
    </van-sticky>
    <news-list v-if="this.dataInfo.id > -100" :comId="this.dataInfo.id" />
  </div>
</template>

<script>
import NewsList from "../../components/NewsList/NewsList";
import { currentUrlToParams } from "@/utils/common.js";
import { NavBar as vanNavBar, Sticky as vanSticky } from "vant";
import "vant/lib/nav-bar/style";
import "vant/lib/sticky/style";
export default {
  name: "app",
  data: function() {
    return {
      dataInfo: {},
      comId: "-2"
    };
  },
  methods: {
    goBack() {
      history.go(-1);
    }
  },
  mounted() {
    this.dataInfo = currentUrlToParams();
  },
  beforeDestroy: function() {},
  components: {
    NewsList,
    vanNavBar,
    vanSticky
  }
};
</script>
<style lang="scss">
.app {
}
</style>
