<template>
  <div class="campus">
    <common-banner :img="bgImg" :height="644">
      <div class="content-wrap">
        <div class="content w1200">
          <div class="left title">中德全国校区</div>
          <div class="right">
            <no-ssr>
              <submit-form></submit-form>
            </no-ssr>
          </div>
        </div>
      </div>
    </common-banner>

    <!-- 全国校区 -->
    <div class="campus-main w1200">
      <title-content :title="'全国校区'" :titleSub="'THE CAMPUS'"></title-content>
      <!-- <div class="title-content">
        <h2 class="title">全国校区</h2>
        <div class="title-sub">THE CAMPUS</div>
      </div> -->
      <div class="c-content w1200">
        <div class="list-wrap">
          <ul class="list">
            <li class="campus-item" v-for="(item, index) in campusList" :key="index">
              <img :src="item.imgUrl" alt="">
              <div class="info">
                <div class="area">{{ item.area }}</div>
                <div class="name">{{ item.name }}</div>
                <div class="address">
                  <div class="icon"><img :src="iconAddr" :srcset="`${iconAddrSet[0]} 1x, ${iconAddrSet[1]} 2x`" alt=""></div>
                  <p>{{ item.address }}</p>
                </div>
                <div class="phone">
                  <div class="icon"><img :src="iconPhone" :srcset="`${iconPhoneSet[0]} 1x, ${iconPhoneSet[1]} 2x`" alt=""></div>
                  <p>{{ item.phone }}</p>
                </div>
                <div class="detail">
                  <!-- to="{name:'news-category',params:{category: indexFirstNewsList.articleCategoryId}} -->
                  <nuxt-link :to="`/merchants/campus/${item.id}`">
                    查看详情
                  </nuxt-link>
                </div>
              </div>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import CommonBanner from '@/components/common/banner';
import SubmitForm from '@/components/common/form';
import TitleContent from '@/components/common/titleContent';

export default {
  data() {
    return {
      bgImg: require('@/assets/images/merchants/bg.png'),
      iconAddr: require('~/assets/images/campus/icon_adderss_new.png'),
      iconAddrSet: [require('~/assets/images/campus/icon_adderss_new.png'), require('~/assets/images/campus/icon_adderss_new@2x.png')],
      iconPhone: require('~/assets/images/campus/icon_phone.png'),
      iconPhoneSet: [require('~/assets/images/campus/icon_phone.png'), require('~/assets/images/campus/icon_phone@2x.png')],
      campusList: [
        {
          id: 1,
          // imgUrl: 'http://zaojiao.net/public/static/index/images/xq/xq1-1.jpg',
          imgUrl: require('~/assets/images/campus/xq1-1.jpg'),
          address: '盈港东路8300弄佳乐苑社区商铺',
          phone: '4007288000',
          name: '襄阳校区',
          area: '上海市·上海市市辖区·青浦区'
        },
        {
          id: 2,
          imgUrl: require('~/assets/images/campus/xq2-1.jpg'),
          address: '盈港东路8300弄佳乐苑社区商铺',
          phone: '4007288000',
          name: '武汉校区',
          area: '上海市·上海市市辖区·青浦区'
        },
        {
          id: 3,
          imgUrl: require('~/assets/images/campus/xq3-1.jpg'),
          address: '盈港东路8300弄佳乐苑社区商铺',
          phone: '4007288000',
          name: '唐山校区',
          area: '上海市·上海市市辖区·青浦区'
        },
        {
          id: 4,
          imgUrl: require('~/assets/images/campus/xq4-1.jpg'),
          address: '盈港东路8300弄佳乐苑社区商铺',
          phone: '4007288000',
          name: '莆田校区',
          area: '上海市·上海市市辖区·青浦区'
        }
      ]
    }
  },
  components: {
    CommonBanner,
    SubmitForm,
    TitleContent
  },
  methods: {

  }
}
</script>

<style lang="scss">
.campus {
  .campus-main {
    margin-top: 100px;
    // .title-content {
    //   .title {
    //     font-size: 34px;
    //     font-family: PingFangSC-Semibold, PingFang SC;
    //     font-weight: 600;
    //     color: #262626;
    //   }
    //   .title-sub {
    //     text-align: center;
    //     margin-top: 10px;
    //     font-size: 16px;
    //     font-family: PingFangSC-Regular, PingFang SC;
    //     font-weight: 400;
    //     color: #646A7E;
    //     line-height: 26px;
    //   }
    // }
  }
  .c-content {
    margin-top: 64px;
    ul {
      li.campus-item {
        display: inline-block;
        width: 374px;
        background:#FFFFFF;
        box-shadow: 0px 9px 13px 0px rgba(123,166,252,0.13);
        border-radius: 10px;
        margin: 0 38px 42px 0;
        transition: transform .3s ease-in-out;
        &:nth-child(3n) {
          margin-right: 0;
        }
        &:hover {
          transform: translate3d(0,-8px,0);
          .detail {
            background: linear-gradient(180deg, #3A7BFE 0%, #024EE8 100%);
            box-shadow: 0px 6px 11px 0px rgba(136, 176, 254, 0.79);
            border-radius: 26px;
            border: none;
            a {
              color: #FFFFFF;
            }
          }
        }
        img {
          width: 100%;
          height: 250px;
          border-radius: 18px 18px 0 0;
        }
        .info {
          height: 175px;
          color: #898A8C;
          padding: 15px 20px 15px;
          .icon {
            margin-right: 8px;
            img {
              width: 10px;
              height: 12px;
            }
          }
        }
        .area {
          font-size:14px;
          font-family: PingFangSC-Regular, sans-serif;
          font-weight: 400;
          color:#898A8C;
          line-height: 20px;
        }
        .name {
          font-size:22px;
          font-family: PingFangSC-Medium, sans-serif;
          font-weight:500;
          color:#1F241E;
          line-height:30px;
          margin-top: 5px;
        }
        .address {
          display: flex;
          align-items: center;
          margin-top: 9px;
          p {
            font-size: 12px;
            font-family: PingFangSC-Regular, sans-serif;
            font-weight: 400;
            color:#898A8C;
          }
        }
        .phone {
          display: flex;
          align-items: center;
          margin-top: 2px;
          p {
            color:#898A8C;
            font-size: 12px;
            font-family: PingFangSC-Regular, sans-serif;
            font-weight: 400;
          }
        }
        .detail {
          width: 85px;
          font-size: 12px;
          text-align: center;
          margin: 17px auto 0;
          border-radius: 16px;
          border: 1px solid rgba(0, 77, 231, 0.5);
          height: 28px;
          display: flex;
          align-items: center;
          justify-content: center;
          a {
            color: #1B1616;
          }
        }
      }
    }
  }
}
</style>
