<template>
  <div class="main_content">
    <img src="https://webapp-pub.ezijing.com/www/pc/practice/Index/banner.png" class="content_banner" />
    <div class="content_part">
      <div class="part_title">{{ $t('baseMain.tit') }}</div>
      <div class="part_desc">
        {{ $t('baseMain.desc') }}
      </div>
    </div>
    <div class="content_part2">
      <img
        :src="
          $cookies.get('lang') == 'en-US'
            ? 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/pc/practice/Index/jd_bg_en.png'
            : 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/pc/practice/Index/jd_bg.png'
        "
        alt=""
      />
    </div>
    <div class="content_part3">
      <div class="part3_con">
        <div class="con_list" v-for="(item, index) in list" :key="index" @click="$router.push(item.url)">
          <div class="mask"></div>
          <img class="img" :src="item.img" alt="" />
          <img class="imgActive" :src="item.imgActive" alt="" />
          <div class="list_tit">{{ item.title }}</div>
          <div class="list_desc" v-html="item.desc"></div>
          <div class="list_btn">{{ $t('skill.item_btn') }}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [
        {
          img: 'https://webapp-pub.ezijing.com/www/pc/practice/Index/icon_gongjian.png',
          imgActive: 'https://webapp-pub.ezijing.com/www/pc/practice/Index/icon_gongjian_active.png',
          title: this.$t('baseMain.item_tit1'),
          desc: this.$t('baseMain.item_desc1'),
          url: 'practice/industry'
        },
        {
          img: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/pc/practice/Index/icon_shiyan.png',
          imgActive: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/pc/practice/Index/icon_shiyan_active.png',
          title: this.$t('baseMain.item_tit2'),
          desc: this.$t('baseMain.item_desc2'),
          url: '/practice/laboratory'
        },
        {
          img: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/pc/practice/Index/icon_1%2Bx.png',
          imgActive: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/pc/practice/Index/icon_1%2Bx_active.png',
          title: this.$t('baseMain.item_tit3'),
          desc: this.$t('baseMain.item_desc3'),
          url: '/practice/skill'
        },
        {
          img: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/pc/practice/Index/icon_pt.png',
          imgActive: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/pc/practice/Index/icon_pt_active.png',
          title: this.$t('baseMain.item_tit4'),
          desc: this.$t('baseMain.item_desc4'),
          url: '/practice/talent'
        }
      ]
    }
  }
}
</script>

<style lang="scss" scoped>
.main_content {
  width: 100%;
  background: #ffffff;
  .content_banner {
    width: 100%;
    height: 580px;
  }
  .content_part {
    width: 100%;
    height: 316px;
    background: #f9f8f8;
    padding: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    .part_title {
      font-size: 30px;
      font-weight: bold;
      color: #333333;
    }
    .part_desc {
      margin-top: 36px;
      font-size: 18px;
      font-weight: 400;
      line-height: 34px;
      color: #666666;
      text-align: center;
    }
  }
  .content_part2 {
    width: 1200px;
    height: 662px;
    margin: 106px auto;
    // background: url('https://webapp-pub.ezijing.com/www/pc/practice/Index/jd_bg.png')
    //   no-repeat center;
    background-size: 100% 100%;
    img {
      width: 100%;
      height: 100%;
    }
  }
  .content_part3 {
    width: 100%;
    background: #f9f8f8;
    padding-top: 120px;
    margin-bottom: 20px;

    .part3_con {
      width: 1200px;
      margin: auto;
      display: flex;
      justify-content: space-between;
      .con_list {
        width: 285px;
        // background: rgba(255, 255, 255, 0.39);
        background-size: 100% 100%;
        box-shadow: 0px 1px 12px rgba(0, 0, 0, 0.13);
        display: flex;
        flex-direction: column;
        // justify-content: space-between;
        align-items: center;
        padding: 47px 0 67px;
        border-bottom: 3px solid #aa1941;
        cursor: pointer;
        text-align: center;
        position: relative;
        .list_tit {
          font-size: 22px;
          font-weight: bold;
          color: #333333;
          height: 70px;
          margin-top: 26px;
        }
        .list_desc {
          font-size: 20px;
          font-weight: 400;
          line-height: 38px;
          color: #666666;
          margin-top: 10px;
          text-align: center;
        }
        .list_btn {
          width: 107px;
          height: 37px;
          background: #aa1941;
          text-align: center;
          line-height: 37px;
          font-size: 14px;
          font-weight: 400;
          color: #ffffff;
          position: absolute;
          bottom: 10px;
        }
        .imgActive {
          display: none;
        }
        .mask {
          position: absolute;
          background: none;
          top: 0;
          right: 0;
          width: 100%;
          height: 100%;
          pointer-events: none;
        }
        &:hover {
          border: none;
          position: relative;
          z-index: 10;
          background-image: url('https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/pc/practice/Index/bg1.png');
          .mask {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.24) !important;
            z-index: 20;
          }
          .imgActive {
            display: block;
            position: relative;
            z-index: 30;
          }
          .img {
            display: none;
          }
          .list_tit {
            margin-top: 26px;
          }
          .list_tit,
          .list_desc {
            color: #ffffff;
            position: relative;
            z-index: 30;
          }
          .list_btn {
            background: #ffffff;
            color: #333333;
            z-index: 30;
            position: absolute;
            bottom: 10px;
          }
        }
      }
      .con_list:nth-child(3) {
        &:hover {
          background-image: url('https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/pc/practice/Index/bg3.png');
        }
      }
      .con_list:nth-child(1) {
        &:hover {
          background-image: url('https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/pc/practice/Index/bg1.png');
        }
      }
      .con_list:nth-child(2) {
        &:hover {
          background-image: url('https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/pc/practice/Index/bg2.png');
        }
      }
      .con_list:nth-child(4) {
        &:hover {
          background-image: url('https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/pc/practice/Index/bg4.png');
        }
      }
    }
  }
}
</style>
