<template>
  <div>
    <div class="ranking-content-box" v-if="!isMobile">
      <div class="title">
        <div class="line"></div>
        <div class="name">学校排名</div>
        <div class="line"></div>
      </div>
      <ul class="content-mian">
        <li v-for="(item, index) in rankingList" :key="index">
          <div class="img">
            <img :src="item.url" />
          </div>
          <h5><span>No.</span>{{ item.rank }}</h5>
          <p>{{ item.text }}</p>
        </li>
      </ul>
    </div>
    <img v-else src="https://webapp-pub.ezijing.com/project/seg-shms/h5-r-0411.jpg" class="ranking-img" />
  </div>
  <!-- https://webapp-pub.ezijing.com/project/seg-shms/h5-ranking.png -->
</template>
<script>
export default {
  name: 'schoolRanking',
  data() {
    return {
      rankingList: [
        {
          url: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/seg-shms/home-ranking-1.jpg',
          rank: 1,
          text: '2019国际卓越旅游和酒店管理教育中心综合排名'
        },
        {
          url: 'https://webapp-pub.ezijing.com/project/seg-shms/US-logo.jpg',
          rank: 2,
          text: '2022 QS 世界大学雇主声誉排名'
        },
        {
          url: 'https://webapp-pub.ezijing.com/project/seg-shms/US-logo.jpg',
          rank: 3,
          text: '2022 QS 世界大学酒店管理专业排名'
        }
      ]
    }
  },
  computed: {
    isMobile() {
      return this.$store.state.isMobile
    }
  }
}
</script>
<style lang="scss" scoped>
.ranking-img {
  width: 100%;
  display: block;
}
.ranking-content-box {
  margin-top: 57px;
  width: 100%;
  height: 680px;
  // background: url(https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/seg-shms/ranking-bg.png) center;
  background: url(https://webapp-pub.ezijing.com/project/seg-shms/Caux-Conference-and-Seminar-Centre_Caux-Village2.jpg) center;
  background-size: cover;
  .title {
    width: 996px;
    display: flex;
    margin: 0 auto;
    justify-content: space-between;
    align-items: center;
    padding: 108px 0 100px;
    .line {
      width: 369px;
      height: 1px;
      background: #ffffff;
    }
    .name {
      font-size: 36px;
      font-weight: bold;
      line-height: 100%;
      color: #ffffff;
    }
  }
  .content-mian {
    width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    li {
      width: 320px;
      color: #fff;
      text-align: center;
      &:nth-child(1) {
        .img {
          img {
            height: 134px;
            object-fit: contain;
            object-position: 60px 10px;
            width: 100%;
          }
        }
      }
      .img {
        width: 100%;
        background: #fff;
        img {
          width: 100%;
        }
      }
      h5 {
        padding: 30px 0 20px;
        font-size: 32px;
        span {
          font-size: 16px;
        }
      }
      p {
        font-size: 12px;
      }
    }
  }
}
</style>