<template>
  <div class="app-container">
    <!-- <h1>{{ roles }}</h1> -->
    <!-- <h1>{{ token }}</h1> -->

    <csoMasterHome v-if="roles.includes('超级管理员')"></csoMasterHome>
    <csoMasterHome v-if="roles.includes('cso主管')"></csoMasterHome>
    <jiaowuHome v-if="roles.includes('教务老师')"></jiaowuHome>
    <kefuHome v-if="roles.includes('客服部老师')"></kefuHome>
    <kefuHome v-if="roles.includes('客服部主管')"></kefuHome>
    <xuefuHome v-if="roles.includes('学服部老师')"></xuefuHome>
    <xuefuMasterHome v-if="roles.includes('学服部主管')"></xuefuMasterHome>
  </div>
</template>

<script>
import csoMasterHome from "../homePage/csoMasterHome.vue";
import jiaowuHome from "../homePage/jiaowuHome.vue";
import kefuHome from "../homePage/kefuHome.vue";
import xuefuHome from "../homePage/xuefuHome.vue";
import xuefuMasterHome from "../homePage/xuefuMasterHome.vue";
import { fullNoticeList } from "@/api/cso2";
import { getToken } from "@/utils/auth";

export default {
  name: "home",
  components: {
    csoMasterHome,
    jiaowuHome,
    kefuHome,
    xuefuHome,
    xuefuMasterHome
  },
  data() {
    return {
      roles: "",
      token: ""
    };
  },

  created() {},
  methods: {
    getList() {
      fullNoticeList().then(res => {
        //   console.log(res, "noticeaddrecord");
      });
    }
  },
  mounted() {
    this.getList();
    this.roles = this.$store.state.user.roles;
    this.token = getToken();
  }
};
</script>

<style lang="scss" scoped>
// .app-container {
// }
</style>
