<template>
  <nav class="app-menu">
    <ul>
      <tree-item :item="item" v-for="(item, index) in list" :key="index" class="first"></tree-item>
    </ul>
  </nav>
</template>

<script>
import TreeItem from '@/components/TreeItem'
export default {
  components: { TreeItem },
  data() {
    return {
      list: [
        {
          name: '关于紫荆',
          children: [
            { name: '紫荆简介', path: '/about/introduce' },
            { name: '文化理念', path: '/about/culture' },
            { name: '新闻中心', path: '/about/news' },
            { name: '联系我们', path: '/about/contact' }
          ]
        },
        {
          name: '学位教育',
          children: [
            { name: '本科', children: [{ name: '海外留学SHMS（即将推出）', onClick: this.showTips }] },
            {
              name: '硕士',
              children: [
                { name: '金融硕士MSF', href: 'https://kelley.ezijing.com' },
                { name: '教育学硕士MED（儿童心理与教育）', href: 'https://cu.ezijing.com' },
                { name: '应用心理学MAP', href: 'https://ciis.ezijing.com' },
                { name: '未来金融领袖计划', href: 'https://cfflp.ezijing.com' }
              ]
            },
            {
              name: 'MBA',
              children: [
                { name: '综合管理方向MBA', href: 'https://marywood.ezijing.com' },
                { name: '金融方向MBA', href: 'https://sofia.ezijing.com' },
                { name: '酒店和旅游方向MBA', href: 'https://shms.ezijing.com' }
              ]
            },
            {
              name: '博士',
              children: [
                { name: '心理学博士DBA（即将推出）', onClick: this.showTips },
                { name: '工商管理学博士EDD（即将推出）', onClick: this.showTips }
              ]
            }
          ]
        },
        {
          name: '教育服务',
          children: [
            {
              name: '1+x',
              children: [
                { name: '金融产品数字化营销证书', href: 'https://x.ezijing.com' }
                // { name: '数字金融客户服务证书', onClick: this.showTips },
                // { name: '酒店及旅游业的数字化营销证书', onClick: this.showTips },
                // { name: '青少年儿童心理以及行为指导证书', onClick: this.showTips }
              ]
            },
            { name: '专业共建', path: '/services/major' },
            { name: '产业学院', path: '/services/college' },
            { name: '新职业', path: '/services/job' },
            { name: '高质量实习就业服务', path: '/services/employment' },
            {
              name: '在线教育解决方案',
              children: [
                { name: '产品技术（即将推出）', onClick: this.showTips },
                { name: '技术支持（即将推出）', onClick: this.showTips },
                { name: '联合运营（即将推出）', onClick: this.showTips }
              ]
            }
          ]
        },
        {
          name: '校友会',
          children: [
            { name: '校友会', path: '/alumnus' }
            // { name: '校友风采', path: '/alumnus/style' }
          ]
        },
        {
          name: '我要报名',
          onClick: () => {
            this.$emit('showApplyForm')
          }
        }
      ]
    }
  },
  methods: {
    showTips() {
      this.$notify({ type: 'primary', message: '暂未开通，尽请期待' })
    }
  }
}
</script>

<style lang="scss">
.app-menu {
  // position: fixed;
  // left: 0;
  // right: 0;
  // top: 0.62rem;
  // bottom: 0;
  padding: 0 0.15rem;
  min-height: 100vh;
  background-color: #fff;
  .first > .cell .cell-title {
    font-size: 0.14rem;
    font-weight: bold;
  }
  .first > .tree-item-group {
    padding: 0;
  }
}
</style>
