<template>
  <div>
    <breadcrumb class="content-max-width crumb" :data="crumbData"/>
    <div class="site-box" v-if="list.length">
      <div class="title">{{ list[0].title }}</div>
      <div class="content" v-html="list[0].content">
        有关单位意向申报成为1+X职业技能等级证书考核站点，请按要求登录政府网站申请试点院校业务平台（网址： https://vslc.ncb.edu.cn ）输入试点院校管理员的账号密码，在考试管理菜单中，打开申报考点栏目，即可自主申报考核站点
      </div>
      <div class="btn" @click="goDetail">去申请</div>
    </div>
  </div>
</template>
<script>
import action from '@action'
import breadcrumb from '@/components/breadcrumb'
export default {
  components: {
    breadcrumb
  },
  data() {
    return {//this.$store.state.classify
      articleClassify: this.$store.state.classify,
      list: [],
      crumbData: [
        {
          path: '/',
          name: '首页'
        },
        {
          name: '考核站点'
        }
      ]
    }
  },
  mounted() {
    this.newsList()
  },
  methods: {
    goDetail() {
      this.$router.push({
        path: '/site/detail'
      })
    },
    newsList() {
      const loading = this.$loading({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'//
      })
      if (!Object.keys(this.$store.state.classify).length) {
        setTimeout(() => {
          this.articleClassify = this.$store.state.classify
          this.newsList()
        }, 2000)
      } else {
        const findId = this.articleClassify.children.find(item => {
          return item.display_name === '考核站点'
        })
        action.articleAction.getArticle({ category_id: findId.id }).then(res => {
          this.list = res.data.list
          loading.close()
        })
      }
    }
  }
}
</script>
<style lang="scss" scoped>
.crumb{
  padding-top: 24px;
}
.content-max-width{
  width: 1112px;
  margin: 0 auto;
}
.site-box{
  width: 650px;
  margin: 0 auto;
  .title{
    text-align: center;
    font-size: 18px;
    color: #222222;
    line-height: 18px;
    margin: 24px 0;
  }
  .content{
    font-size: 14px;
    color: #666666;
    line-height: 20px;
  }
  .btn{
    text-align: center;
    width: 96px;
    height: 36px;
    background: linear-gradient(315deg, rgba(225, 47, 116, 0.83) 0%, #C01540 100%);
    border-radius: 4px;
    font-size: 14px;
    color: #FFFFFF;
    line-height: 20px;
    margin: 24px auto;
    line-height: 36px;
    cursor: pointer;
  }
}
</style>
