<template>
  <common-header/>
  <div class="banner-box pr">
    <div class="banner"
         :style="{'background': 'url('+curMenu.img+') top no-repeat','background-size': 'cover'}"></div>
    <div class="right-menu">
      <ul>
        <li v-for="item in menuList" :class="item.id == curMenu.id?'selected':''" srcmouseover="switchImg(item)">
          {{ item.title }}
        </li>
      </ul>
    </div>
    <div class="mask"></div>
  </div>
  <div class="content-bg">
    <div class="main">
      <div class="d-flex course-box flex-between">
        <div class="">
          <div class="d-flex flex-between flex-v-mid">
            <h3 class="font-size-26 text-white">学生优秀作业</h3>
            <div>
              <span class="d-in-block v-mid arrow prev"></span>
              <span class="ml10 d-in-block v-mid arrow next"></span>
            </div>
          </div>
          <ul class="mt10 course-list">
            <li v-for="item in xsyxzy">
              <div class="course-img pr">
                <img :src="item.img" alt="">
                <div class="tag-info text-center">
                  <span class="tag-icon prove d-in-block v-mid"></span>
                  <span class="d-in-block v-mid font-size-13 text-white">{{ item.prove }}</span>
                  <span class="ml10 tag-icon favor d-in-block v-mid"></span>
                  <span class="d-in-block v-mid font-size-13 text-white">{{ item.favor }}</span>
                </div>
              </div>
              <div class="course-info">
                <h3 class="font-size-16 text-overflow">{{ item.title }}</h3>
                <el-rate
                    v-model="item.rate"
                    disabled
                />
              </div>
            </li>
          </ul>
        </div>
        <div class="">
          <div class="d-flex flex-between">
            <h3 class="font-size-26 text-white">教师优秀作品</h3>
            <div>
              <span class="d-in-block v-mid arrow prev"></span>
              <span class="ml10 d-in-block v-mid arrow next"></span>
            </div>
          </div>
          <ul class="mt10 course-list">
            <li v-for="item in jsxyzp">
              <div class="course-img pr">
                <img :src="item.img" alt="">
                <div class="tag-info text-center">
                  <span class="tag-icon prove d-in-block v-mid"></span>
                  <span class="d-in-block v-mid font-size-13 text-white">{{ item.prove }}</span>
                  <span class="ml10 tag-icon favor d-in-block v-mid"></span>
                  <span class="d-in-block v-mid font-size-13 text-white">{{ item.favor }}</span>
                </div>
              </div>
              <div class="course-info">
                <h3 class="font-size-16 text-overflow">{{ item.title }}</h3>
                <el-rate
                    v-model="item.rate"
                    disabled
                />
              </div>
            </li>
          </ul>
        </div>
      </div>
      <h3 class="title m-65">课程资源</h3>
      <div class="res-list mt40">
        <a href="javascript:;">
          <div class="res-icon m-0">
            <img src="@/assets/images/home/c-1.png" alt="">
          </div>
          <h3 class="mt15 font-size-26 text-center">基础课程</h3>
          <h4 class="mt15 font-size-16 color-6 text-center ph20">基础课程基础课程基础课程 基础课程基础课程基础课程
            基础课程基础课程</h4>
        </a>
        <a href="javascript:;" @click="toTeacher">
          <div class="res-icon m-0">
            <img src="@/assets/images/home/c-2.png" alt="">
          </div>
          <h3 class="mt15 font-size-26 text-center">名师在线</h3>
          <h4 class="mt15 font-size-16 color-6 text-center ph20">名师在线名师在线名师在线
            名师在线名师在线</h4>
        </a>
        <a href="javascript:;" @click="toTeacher">
          <div class="res-icon m-0">
            <img src="@/assets/images/home/c-3.png" alt="">
          </div>
          <h3 class="mt15 font-size-26 text-center">课程资源</h3>
          <h4 class="mt15 font-size-16 color-6 text-center ph20">课程资源课程资源课程资源 课程资源课程资源
            课程资源课程资源课程资源 课程资源课程资源</h4>
        </a>
        <a href="javascript:;">
          <div class="res-icon m-0">
            <img src="@/assets/images/home/c-4.png" alt="">
          </div>
          <h3 class="mt15 font-size-26 text-center">特色课程</h3>
          <h4 class="mt15 font-size-16 color-6 text-center ph20">特色课程特色课程特色课程</h4>
        </a>
        <a href="javascript:;">
          <div class="res-icon m-0">
            <img src="@/assets/images/home/c-5.png" alt="">
          </div>
          <h3 class="mt15 font-size-26 text-center">家庭教育</h3>
          <h4 class="mt15 font-size-16 color-6 text-center ph20">家庭教育家庭教育家庭教育 家庭教育</h4>
        </a>
        <a href="javascript:;">
          <div class="res-icon m-0">
            <img src="@/assets/images/home/c-6.png" alt="">
          </div>
          <h3 class="mt15 font-size-26 text-center">拓展课程</h3>
          <h4 class="mt15 font-size-16 color-6 text-center ph20">拓展课程拓展课程拓展课程</h4>
        </a>
      </div>
      <h3 class="title m-65">直播课程</h3>
      <div class="mt45 d-flex live-list">
        <a href="javascript:;" class="pt65 pl85" @click="toLive(1)">
          <h3 class="font-size-30 text-white font-bold-1">双师一生</h3>
          <h4 class="mt40 font-size-16 text-white">轻松便捷的快速构建教学</h4>
          <h4 class="mt15 font-size-16 text-white">超强的抗弱网能力，优秀的网络自适应策略保证优质观看效果</h4>
          <h4 class="mt15 font-size-16 text-white">满足大规模教师、学生同时接入</h4>
          <h5 class="mt80 pr80 font-size-16 lh20 text-white text-right">
            <span class="d-in-block v-mid">查看课程</span>
            <span class="ml3 d-in-block v-mid arrow-right"></span>
          </h5>
        </a>
        <a href="javascript:;" @click="toLive(2)">
          <div class="text-center">
            <h3 class="font-size-30">网络直播</h3>
            <h4 class="mt15 font-size-16 color-6">网络直播网络直播网络直播</h4>
          </div>
        </a>
        <a href="javascript:;" @click="toLive(3)">
          <div class="text-center">
            <h3 class="font-size-30">专题直播</h3>
            <h4 class="mt15 font-size-16 color-6">专题直播专题直播专题直播专题直播</h4>
          </div>
        </a>
      </div>
      <h3 class="title m-30">智慧教研</h3>
      <ul class="wit-list mt100">
        <li class="text-center">
          <img src="@/assets/images/home/j-1.png" alt="">
          <h3 class="font-size-30 font-bold-1">在线学习</h3>
          <h4 class="m-15 font-size-16 w-200 color-6">在线学习在线学习在线学习 在线学习在线学习 在线学习</h4>
        </li>
        <li class="text-center">
          <img src="@/assets/images/home/j-2.png" alt="">
          <h3 class="font-size-30 font-bold-1">协同备课</h3>
          <h4 class="m-15 font-size-16 w-200 color-6">协同备课协同备课协同备课协同备课</h4>
        </li>
        <li class="text-center">
          <img src="@/assets/images/home/j-3.png" alt="">
          <h3 class="font-size-30 font-bold-1">同步教研</h3>
          <h4 class="m-15 font-size-16 w-200 color-6">同步教研同步教研同步教研同步教研同步教研</h4>
        </li>
      </ul>
      <h3 class="title m-65">数字美术馆</h3>
      <div class="mt30 d-flex flex-between pb30">
        <a href="#" class="m-box">
          <h3 class="font-size-30 font-bold-1">艺术联盟</h3>
          <h4 class="mt20 font-size-16 color-6">轻松便捷的快速构建教学</h4>
          <h4 class="font-size-16 color-6">超强的抗弱网能力，优秀的网络自适应策略保证优质观看效果</h4>
          <h5 class="mt20 font-size-16 lh20 text-blue">
            <span class="d-in-block v-mid">了解详情</span>
            <span class="ml3 d-in-block v-mid arrow-right blue"></span>
          </h5>
        </a>
        <a href="#" class="m-box">
          <h3 class="font-size-30 font-bold-1">特色课程展</h3>
          <h4 class="mt20 font-size-16 color-6">轻松便捷的快速构建教学</h4>
          <h4 class="font-size-16 color-6">超强的抗弱网能力，优秀的网络自适应策略保证优质观看效果</h4>
          <h5 class="mt20 font-size-16 lh20 text-blue">
            <span class="d-in-block v-mid">了解详情</span>
            <span class="ml3 d-in-block v-mid arrow-right blue"></span>
          </h5>
        </a>
      </div>
    </div>
  </div>



</template>
<script>
import commonHeader from "@/components/header/index.vue";

export default {
  components: {
    commonHeader
  },
  data() {
    return {
      menuList: [{
        id: 1,
        title: '星月夜',
        img: window.GLOBAL_CONFIG.origin + '/assets/images/home/banner-1.png'
      }, {
        id: 2,
        title: '安徒生世界插画',
        img: window.GLOBAL_CONFIG.origin + '/assets/images/home/banner-2.png'
      }, {
        id: 3,
        title: '传送门',
        img: window.GLOBAL_CONFIG.origin + '/assets/images/home/banner-3.png'
      }, {
        id: 4,
        title: '拇指姑娘',
        img: window.GLOBAL_CONFIG.origin + '/assets/images/home/banner-1.png'
      }, {
        id: 5,
        title: '书中花园',
        img: window.GLOBAL_CONFIG.origin + '/assets/images/home/banner-2.png'
      }, {
        id: 6,
        title: '大猩猩与小星星',
        img: window.GLOBAL_CONFIG.origin + '/assets/images/home/banner-3.png'
      }, {
        id: 7,
        title: '大猩猩与小星星',
        img: window.GLOBAL_CONFIG.origin + '/assets/images/home/banner-1.png'
      }, {
        id: 8,
        title: '莉娜与野鸟',
        img: window.GLOBAL_CONFIG.origin + '/assets/images/home/banner-2.png'
      }, {
        id: 9,
        title: '丑小鸭',
        img: window.GLOBAL_CONFIG.origin + '/assets/images/home/banner-3.png'
      }],
      curMenu: {
        id: 1,
        title: '星月夜',
        img: window.GLOBAL_CONFIG.origin + '/assets/images/home/banner-1.png'
      },
      value: '4',
      xsyxzy: [{
        id: '1',
        img: window.GLOBAL_CONFIG.origin +'/assets/images/home/1.png',
        title: '野天鹅',
        rate: 5,
        prove: '10w+',
        favor: '14w+'
      }, {
        id: '2',
        img: window.GLOBAL_CONFIG.origin +'/assets/images/home/2.png',
        title: '安徒生世界插画',
        rate: 4,
        prove: '9w+',
        favor: '14w+'
      }, {
        id: '3',
        img: window.GLOBAL_CONFIG.origin +'/assets/images/home/3.png',
        title: '传送门',
        rate: 4,
        prove: '10w+',
        favor: '14w+'
      }, {
        id: '4',
        img: window.GLOBAL_CONFIG.origin + '/assets/images/home/4.png',
        title: '拇指姑娘',
        rate: 4,
        prove: '10w+',
        favor: '14w+'
      }],
      jsxyzp: [{
        id: '1',
        img: window.GLOBAL_CONFIG.origin + '/assets/images/home/1.png',
        title: '野天鹅',
        rate: 5,
        prove: '10w+',
        favor: '14w+'
      }, {
        id: '2',
        img: window.GLOBAL_CONFIG.origin +'/assets/images/home/2.png',
        title: '安徒生世界插画',
        rate: 4,
        prove: '9w+',
        favor: '14w+'
      }, {
        id: '3',
        img: window.GLOBAL_CONFIG.origin + '/assets/images/home/3.png',
        title: '传送门',
        rate: 4,
        prove: '10w+',
        favor: '14w+'
      }]
    }

  },
  methods: {
    switchImg(item) {
      this.curMenu = item;
    },
    toTeacher() {
      this.$router.push({name:'resource'});
      localStorage.setItem('curNav','resource');
    },
    toLive(type) {
      switch (type) {
        case 1:
          this.$router.push({name:'ssys'});
          localStorage.setItem('curNav','zbkt');
          break;
        case 2:
          this.$router.push({name:'wlzb'});
          localStorage.setItem('curNav','zbkt');
          break;
        case 3:
          this.$router.push({name:'ztzb'});
          localStorage.setItem('curNav','zbkt');
          break;
      }
    }
  }
}
</script>
<style lang="scss" scoped>
@import "@/styles/mixin.scss";
</style>

<style lang="scss" scoped>
.main {
  width: 1650px;
  margin: 0 auto;
}
.banner-box {
  width: 100%;
  height: 626px;

  .banner {
    width: 100%;
    height: 100%;
  }

  .mask {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 50;
    width: 100%;
    height: 100%;
    background: radial-gradient(rgba(255, 255, 255, 0.00), rgba(160, 221, 255, 0.00), rgba(74, 190, 255, 0.54), rgba(0, 163, 255, 0.86));
  }

  .right-menu {
    position: absolute;
    left: 50%;
    top: 0;
    z-index: 60;
    margin-left: 505px;
    width: 318px;
    height: 560px;
    background: linear-gradient(270deg, rgba(0, 163, 255, .41), rgba(0, 208, 255, 0.16));
    display: flex;
    justify-content: right;

    ul {
      padding-top: 60px;
      padding-right: 10px;

      li {
        font-size: 16px;
        color: #fff;
        position: relative;
        text-align: right;
        height: 30px;
        line-height: 30px;
        cursor: pointer;

        &.selected,
        &:hover {
          font-size: 28px;
        }

        & + li {
          margin-top: 18px;
        }
      }
    }
  }
}

.content-bg {
  width: 100%;
  height: 700px;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.00) 0%, rgba(0, 163, 255, .86));
}

.course-box {
  position: relative;
  z-index: 80;
  margin-top: -48px;
  align-items: center;

  .arrow {
    width: 20px;
    height: 20px;

    &.prev {
      background: url("src/assets/images/home/arr-left.png") center no-repeat;
      background-size: 20px 20px;

      &:hover {
        background: url("src/assets/images/home/arr-left-hover.png") center no-repeat;
        background-size: 20px 20px;
      }
    }

    &.next {
      background: url("src/assets/images/home/arr-right.png") center no-repeat;
      background-size: 20px 20px;

      &:hover {
        background: url("src/assets/images/home/arr-right-hover.png") center no-repeat;
        background-size: 20px 20px;
      }
    }
  }

  .course-list {
    width: 100%;
    display: flex;

    li {
      cursor: pointer;
      min-width: 223px;
      width: 223px;
      border-radius: 12px;
      background: #fff;

      + li {
        margin-left: 14px;
      }
    }

    .course-img {
      width: 100%;
      height: 131px;
      border-radius: 12px 12px 0 0;
      overflow: hidden;

      img {
        width: 100%;
      }

      .tag-info {
        position: absolute;
        right: 0;
        top: 0;
        z-index: 30;
        width: 137px;
        height: 27px;
        background: rgba(0, 0, 0, .59);
        border-radius: 0 10px 0 10px;

        .tag-icon {
          width: 20px;
          height: 20px;

          &.prove {
            background: url("src/assets/images/home/icon-prove.png") center no-repeat;
            background-size: 14px 14px;
          }

          &.favor {
            background: url("src/assets/images/home/icon-favor.png") center no-repeat;
            background-size: 15px 13px;
          }
        }
      }
    }

    .course-info {
      width: 100%;
      padding: 8px 6px;
    }
  }
}

.title {
  width: 241px;
  height: 50px;
  background: url("src/assets/images/home/title-bg.png") center no-repeat;
  font-size: 34px;
  color: #000;
  text-align: center;
  line-height: 50px;
}

.res-list {
  display: flex;

  a {
    width: 251px;
    height: 390px;
    border-radius: 12px;
    background: #fff;
    padding-top: 56px;
    margin-left: 18px;

    &:hover {
      position: relative;
      z-index: 30;
      border: 2px solid #00a3ff;
      box-shadow: 0 0 6px rgba(0, 78, 255, 0.79);
      transform: scale(1.2);
    }

    .res-icon {
      width: 89px;
      height: 89px;

      img {
        width: 100%;
      }
    }
  }
}

.live-list {
  padding-left: 100px;

  a {
    height: 391px;

    &:first-child {
      margin-top: -15px;
      margin-right: -25px;
      width: 885px;
      height: 439px;
      background: url("src/assets/images/home/live-1.png") center no-repeat;
    }

    &:nth-child(2) {
      width: 301px;
      background: url("src/assets/images/home/live-2.png") center no-repeat;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    &:nth-child(3) {
      width: 301px;
      background: url("src/assets/images/home/live-3.png") center no-repeat;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }

}

.wit-list {
  display: flex;

  li {
    width: 500px;
    height: 381px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(153, 162, 168, 0.18);

    img {
      display: block;
      margin: -60px auto 40px;
      max-width: 100%;
    }

    & + li {
      margin-left: 50px;
    }
  }
}

.arrow-right {
  width: 20px;
  height: 20px;
  background: url("src/assets/images/home/arrow-right.png") center no-repeat;
  background-size: 20px 20px;

  &.blue {
    background: url("src/assets/images/home/arrow-right-blue.png") center no-repeat;
    background-size: 20px 20px;
  }
}

.m-box {
  width: 833px;
  height: 277px;
  padding: 41px 0 0 81px;

  &:first-child {
    background: url("src/assets/images/home/m-1.png") center no-repeat;
  }

  &:nth-child(2) {
    background: url("src/assets/images/home/m-2.png") center no-repeat;
  }
}
</style>
