<template>
  <div class="footer">
    <div class="inner">
      <div class="info">
        <div style="margin-right: 100px">
          <img class="m-b-20" src="@/assets/images/iasf.png" alt="">
          <p class="meta">Copyright ©2002- 2021</p>
          <p class="meta">Institute of Advanced Science Facilities, ShenzhenIASF</p>
          <p class="meta">Tel：400-0010-998</p>
        </div>
        <div v-for="(item, i) in columns" :key="i" class="column">
          <h6>{{ item.columnName }}</h6>
          <ul v-if="item.children.length" class="children">
            <li v-for="(column, j) in item.children" :key="j">{{ column.columnName }}</li>
          </ul>
        </div>
      </div>
      <a class="copyright">粤ICP备2020131940号  粤公安网34565432456765432号</a>
    </div>
  </div>
</template>
<script>
import Setting from '@/setting'
export default {
  data() {
    return {
      columns: [],
      isIndex: this.$route.path !== '/login' && Setting.whiteList.some(e => e === this.$route.path) // 官网3个页面才能显示邮箱和版权号
    };
  },
  mounted(){
    this.getColumn()
  },
  methods: {
    // 资讯
    getColumn() {
      this.$post(this.api.listWithTree, {
        siteId: 1,
        columnName: '',
        templateId: '',
        typeId	: '',
        isSort: 0
      }).then(({ data }) => {
        this.columns = data.filter(e => !e.menuVisible).slice(0, 8)
      }).catch(err => {})
    },
    // 跳转
    jump(item) {
      const { id } = item
      this.active = id
      this.$router.push('channel?id=' + id).catch(err => {})
    }
  },
};
</script>
<style lang="scss" scoped>
.footer{
  padding: 64px 0 25px;
  color: #fff;
  background-color: #091733;
  .inner {
    width: 1500px;
    margin: 0 auto;
  }
  .info {
    display: flex;
    margin-bottom: 100px;
  }
  .meta {
    margin-bottom: 10px;
    font-size: 14px;
  }
  .column {
    margin: 0 20px;
    h6 {
      margin-bottom: 20px;
      font-size: 16px;
      white-space: nowrap;
    }
  }
  .children {
    li {
      margin: 12px 0;
      font-size: 14px;
      color: #6D7384;
      white-space: nowrap;
      cursor: pointer;
    }
  }
  .copyright {
    font-size: 14px;
    color: #6D7384;
  }
}
</style>