<template>
  <div>
    <div class="service-content max-width-center">
      <div :class="isMobile ? 'is-h5' : 'is-pc'">
        <card :title="$t('home.project.title')">
          <ul class="nav-content">
            <li v-for="(item, index) in data" :key="index">
              <img :src="item.icon" class="icon" />
              <img v-if="!isMobile" :src="item.iconActive" class="icon-active" />
              <div class="text" v-html="item.text"></div>
            </li>
          </ul>
        </card>
      </div>
    </div>
    <card title="问：聚焦经营问题" class="max-width-center question-box">
      <div class="q-c">
        <img src="https://webapp-pub.ezijing.com/project/exed/project-ts.png" />
      </div>
    </card>
    <div class="answer-box">
      <card title="学：解决问题" class="max-width-center" color="#fff" bColor="#fff">
        <div class="answer-list_all">
          <div class="answer-list" v-for="(item, index) in answerList" :key="index">
            <div class="answer-list_item" v-for="cItem in item" :key="cItem" v-html="cItem"></div>
          </div>
        </div>
      </card>
    </div>
  </div>
</template>
<script>
import Card from '@/components/Card'
import AppLink from '@/components/Link'
export default {
  name: 'projectFeatures',
  components: {
    AppLink,
    Card
  },
  data() {
    return {
      answerList: [
        ['《企业价值增长战略与数字化升级转型》', '《定位战略：新竞争时期企业经营之道》', '《科技创新趋势与创新能力提升》'],
        ['《构建以客户为中心流程管理》', '《大客户销售与管理》', '《解决民营企业十大财税痛点》'],
        ['《战略执行力体系搭建》', '《领导力：打造高效带队伍的方法》', '《基于战略的薪酬体系设计》', '《财富管理与资产配置》']
      ],
      titleParams: {
        name: this.$t('home.project.title')
      },
      data: [
        {
          icon: 'https://webapp-pub.ezijing.com/project/exed/home_icon_1.png',
          iconActive: 'https://webapp-pub.ezijing.com/project/exed/home_icon_11.png',
          text: '源自清华<br />国企背景',
          path: '',
          pathType: 0
        },
        {
          icon: 'https://webapp-pub.ezijing.com/project/exed/home_icon_2.png',
          iconActive: 'https://webapp-pub.ezijing.com/project/exed/home_icon_22.png',
          text: '真心教育<br />追求结果',
          path: '',
          pathType: 0
        },
        {
          icon: 'https://webapp-pub.ezijing.com/project/exed/home_icon_3.png',
          iconActive: 'https://webapp-pub.ezijing.com/project/exed/home_icon_33.png',
          text: '名师大咖<br />真知灼见',
          path: '',
          pathType: 0
        },
        {
          icon: 'https://webapp-pub.ezijing.com/project/exed/home_icon_4.png',
          iconActive: 'https://webapp-pub.ezijing.com/project/exed/home_icon_44.png',
          text: '营道同术<br />基业长青',
          path: '',
          pathType: 0
        },
        {
          icon: 'https://webapp-pub.ezijing.com/project/exed/home_icon_5.png',
          iconActive: 'https://webapp-pub.ezijing.com/project/exed/home_icon_55.png',
          text: '财富管理<br />资产配置',
          path: '',
          pathType: 0
        }
      ]
    }
  },
  methods: {
    goPage(path) {
      if (path === '') {
        // this.$message('暂未开通，尽请期待。')
        return
      }
      window.open(path)
    }
  },
  mounted() {
    console.log(this.isMobile)
  },
  computed: {
    isMobile() {
      return this.$store.state.isMobile
    }
  }
}
</script>

<style lang="scss" scoped>
.is-pc {
  .question-box {
    margin: 100px auto 0 !important;
    .q-c {
      background: #fff;
      margin-top: 80px;
    }
  }
  .answer-box {
    background-color: #aa1941;
    padding: 70px 0 80px;
    margin-top: 95px;
    .answer-list_all {
      padding-top: 70px;
      display: flex;
      justify-content: space-between;
      .answer-list {
        .answer-list_item {
          width: 378px;
          height: 50px;
          border: 1px solid #fff;
          text-align: center;
          line-height: 50px;
          color: #fff;
          // padding-top: 5px;
          box-sizing: border-box;
          margin-bottom: 8px;
        }
      }
    }
  }
  .service-content {
    padding-top: 68px;
    .nav-content {
      display: flex;
      justify-content: space-between;
      padding-top: 70px;
      li {
        width: 170px;
        height: 186px;
        padding-top: 30px;
        box-sizing: border-box;
        // background: #f9f8f8;
        border: 1px solid #d5d5d5;
        // background: #fff;
        // box-shadow: 0px 4px 38px rgba(142, 30, 34, 0.41);
        cursor: pointer;
        transition: all 0.3s;
        img {
          width: 64px;
          height: 64px;
          display: block;
          margin: 0 auto;
        }
        .icon-active {
          display: none;
        }
        &:hover {
          background: #aa1941;
          box-shadow: 0px 4px 20px rgba(142, 30, 34, 0.41);
          .text {
            color: #fff;
          }
          .icon {
            display: none;
          }
          .icon-active {
            display: block;
          }
        }
        .text {
          font-size: 16px;
          line-height: 26px;
          color: #666666;
          margin-top: 23px;
          text-align: center;
        }
      }
    }
  }
  .max-width-center {
    width: 1212px;
    margin: 0 auto;
  }
}
.is-h5 {
  .service-content {
    ul {
      display: flex;
      overflow-x: scroll;
      -webkit-overflow-scrolling: touch;
    }
    li {
      min-width: 0.78rem;
      background: #ffffff;
      margin-right: 0.1rem;
      padding-top: 0.11rem;
      img {
        width: 0.4rem;
        height: 0.4rem;
        display: block;
        margin: 0 auto;
      }
      .text {
        font-size: 0.1rem;
        line-height: 0.16rem;
        color: #666666;
        padding-top: 0.05rem;
        text-align: center;
        padding-bottom: 0.1rem;
      }
    }
  }
}
</style>
