<template>
  <div class="home">
    <el-empty :image-size="200" v-if="bannerList.length < 1"></el-empty>
    <div v-if="bannerList.length > 0" class="bannerWrapper">
      <img src="./../assets/banner2.jpg" alt="" />
      <img src="./../assets/homeTit.png" alt="" class="homeTit" />
      <router-link to="/product">
        <img src="./../assets/homeBannerBtn.png" alt="" class="homeBannerBtn" />
      </router-link>
    </div>
    <!-- <el-carousel trigger="click" :interval="5000" v-if="bannerList.length > 0" height="820px">
      <el-carousel-item v-for="(item, index) in bannerList" :key="index">
        <router-link to="/productTrials"><img style="width: 100%; height: 100%" :src="item.url" /></router-link>
      </el-carousel-item>
    </el-carousel> -->
    <div class="content">
      <div class="homeContainer">
        <b-container style="padding: 0">
          <div style="margin: 40px 0">
            <h3>帮助企业提高销售效率 提升客户满意度</h3>
            <h6 style="color: gray; margin-top: 15px">
              为企业的发展注入新的活力
            </h6>
          </div>
          <div style="display: flex">
            <div class="swiperwrapper_slide1">
              <div class="slideBox1">
                <div style="font-size: 13px; margin-top: 50px">
                  SFA销售管理软件
                </div>
                <div
                  style="font-size: 25px; font-weight: 700; margin-top: 20px"
                >
                  通誉智慧外勤管家
                </div>
                <div style="margin-top: 20px; color: gray; font-size: 13px">
                  帮助企业解决终端销售过程中的各种难题，提高销售效率优化销售流程、提高客户满意度，同时为企业数字化转型打下坚实的基础。
                </div>
                <router-link to="/productTrials"
                  ><img
                    style="margin-top: 20px; width: 70px"
                    src="./../assets/learnMore2.png"
                /></router-link>
              </div>
            </div>
            <div class="swiperwrapper_slide2">
              <div class="rowleft">
                <el-empty
                  :image-size="200"
                  v-if="expertList.length < 1"
                ></el-empty>
                <swiper
                  class="swiper"
                  :options="swiperOption"
                  v-if="expertList.length > 0"
                >
                  <swiper-slide
                    class="slide"
                    v-for="(item, index) in expertList"
                    :key="index"
                  >
                    <div
                      class="slideBox2"
                      @mouseover="iconUrlhoverIndex = index"
                      @mouseout="iconUrlhoverIndex = -1"
                    >
                      <div
                        style="
                          margin-top: 50px;
                          text-align: center;
                          font-size: 22px;
                          font-weight: 700;
                        "
                      >
                        {{ item.title }}
                      </div>
                      <div
                        style="
                          display: flex;
                          justify-content: center;
                          margin-top: 20px;
                        "
                      >
                        <img
                          style="width: 80px"
                          src="./../assets/blueLine2.png"
                        />
                      </div>
                      <div
                        style="
                          margin-top: 20px;
                          font-size: 14px;
                          font-weight: 500;
                          padding: 0 10px;
                        "
                      >
                        {{ item.text }}
                      </div>
                      <div
                        style="
                          display: flex;
                          justify-content: center;
                          height: 130px;
                          overflow: hidden;
                          position: absolute;
                          bottom: 0;
                          left: 40px;
                        "
                      >
                        <img
                          style="
                            margin-top: 20px;
                            width: 200px;
                            height: 200px;
                            opacity: 0.3;
                          "
                          :src="
                            iconUrlhoverIndex == index
                              ? item.iconUrl1
                              : item.iconUrl
                          "
                        />
                      </div>
                    </div>
                  </swiper-slide>
                  <div class="swiper-pagination" slot="pagination"></div>
                  <div
                    class="swiper-button-prev"
                    v-if="expertList.length > 2"
                    slot="button-prev"
                  >
                    <i
                      class="el-icon-arrow-left"
                      style="
                        background-color: rgba(0, 0, 0, 0.3);
                        border-radius: 62px;
                        padding: 8px;
                        color: #fff;
                      "
                    ></i>
                  </div>
                  <div
                    class="swiper-button-next"
                    v-if="expertList.length > 2"
                    slot="button-next"
                  >
                    <i
                      class="el-icon-arrow-right"
                      style="
                        background-color: rgba(0, 0, 0, 0.3);
                        border-radius: 62px;
                        padding: 8px;
                        color: #fff;
                      "
                    ></i>
                  </div>
                </swiper>
              </div>
            </div>
          </div>
        </b-container>
      </div>
      <div class="homeContainer box1">
        <b-container style="padding: 0">
          <div style="margin: 40px 0 10px">
            <h3>为什么选择神州通誉</h3>
            <h6 style="color: gray; margin-top: 15px">
              专业资质 坚持核心技术自主研发 以成就客户为己任
            </h6>
          </div>
          <el-row style="margin-bottom: 50px !important; cursor: pointer">
            <el-col :span="24">
              <div class="itemWrapper">
                <div style="font-size: 18px; font-weight: 800">
                  强大的研发实力
                </div>
                <img
                  style="width: 30px; margin-top: -15px"
                  src="./../assets/blueLine3.png"
                />
                <div
                  style="font-size: 18px; font-weight: 500; margin-top: -10px"
                >
                  在北京、上海、洛阳、杭州等十余座城市拥有分支机构，业务遍布五十多个城市地区，拥有多个专项专利和百余项软著、产品。同时公司也荣获了高新技术企业、专精特新企业并通过CMMI5、质量管理体系等多个资质等级认证。
                </div>
              </div>
              <div class="itemWrapper">
                <div style="font-size: 18px; font-weight: 800">
                  优秀的品牌力
                </div>
                <img
                  style="width: 30px; margin-top: -15px"
                  src="./../assets/blueLine3.png"
                />
                <div
                  style="font-size: 18px; font-weight: 500; margin-top: -10px"
                >
                  神州通誉及旗下公司以“成就客户，专业服务，共同成长”为创业宗旨，坚持以核心技术研发，创新服务模式为发展战略，现今成为国内知名的人工智能+大数据+物联网+产品+云服务的综合IT服务商。
                </div>
              </div>
              <div class="itemWrapper">
                <div style="font-size: 18px; font-weight: 800">
                  专业的服务力
                </div>
                <img
                  style="width: 30px; margin-top: -15px"
                  src="./../assets/blueLine3.png"
                />
                <div
                  style="font-size: 18px; font-weight: 500; margin-top: -10px"
                >
                  公司为客户提供稳定可靠、专业高效的IT人员外包服务，以有效支持客
                  户的业务战略。我们提供现场服务、远程服务等多种不同方式的服务支持，以帮助客户降低风险和成本，并确保高质量的服务。
                </div>
              </div>
            </el-col>
          </el-row>
        </b-container>
      </div>
      <div style="margin-bottom: 40px; padding-top: 40px">
        <h3>中大型企业的专业选择</h3>
        <h6 style="color: gray; margin-top: 15px">
          服务涵盖能源电信、零售制造、金融、高科技等行业
        </h6>
      </div>
      <div style="color: gray">
        <img style="width: 100%" src="./../assets/workTage.png" />
      </div>
      <div class="homeContainer box1">
        <div>
          <h3>来自合作伙伴的信任</h3>
          <h6 style="color: gray; margin-top: 15px">
            我们致力于为客户提供成熟的产品
          </h6>
        </div>
        <b-container style="padding: 0; padding-top: 40px" class="pdlr">
          <div style="margin-bottom: 16px" class="expert carousel">
            <div class="rowleft">
              <el-empty :image-size="200" v-if="List.length < 1"></el-empty>
              <swiper
                class="swiper"
                :options="swiperOption1"
                v-if="List.length > 0"
              >
                <swiper-slide
                  class="slide"
                  v-for="(item, index) in List"
                  :key="index"
                >
                  <div
                    class="expertList"
                    style="
                      border-radius: 4px;
                      border: 1px solid #f5f5f5;
                      padding: 14px;
                      background-color: #fff;
                      background-color: #fff;
                      box-shadow: 0px 0px 12px -9px #ccc;
                    "
                  >
                    <div class="slikss">
                      <div class="imgbox">
                        <img
                          class="expertAvatar1"
                          style="
                            width: 100%;
                            margin: 0 auto;
                            display: block;
                            height: 180px;
                          "
                          :src="item.image"
                          alt=""
                        />
                      </div>
                    </div>
                    <div>
                      <h3
                        class="listTitle"
                        style="
                          display: flex;
                          justify-content: space-between;
                          color: #333333;
                          line-height: 46px;
                          font-size: 16px;
                          margin: 10px auto 0;
                          margin: 10px auto 10px;
                          border-bottom: 1px solid #f5f5f5;
                        "
                      >
                        {{ item.title }}
                        <span
                          style="
                            color: #004ca1;
                            float: right;
                            font-size: 14px;
                            font-weight: bold;
                          "
                          >{{ item.pubDate }}</span
                        >
                      </h3>
                      <p
                        class="textTwoHide3 hideMobile expertInfo"
                        style="font-size: 14px"
                      >
                        {{ item.subTitle }}
                      </p>
                      <p class="showMobile" @click="open(item.subTitle)">
                        客户信息
                      </p>
                    </div>
                  </div>
                </swiper-slide>
                <div class="swiper-pagination" slot="pagination"></div>
                <div
                  class="swiper-button-prev"
                  v-if="expertList.length > 2"
                  slot="button-prev"
                >
                  <i
                    class="el-icon-arrow-left"
                    style="
                      background-color: rgba(0, 0, 0, 0.3);
                      border-radius: 62px;
                      padding: 8px;
                      color: #fff;
                    "
                  ></i>
                </div>
                <div
                  class="swiper-button-next"
                  v-if="expertList.length > 2"
                  slot="button-next"
                >
                  <i
                    class="el-icon-arrow-right"
                    style="
                      background-color: rgba(0, 0, 0, 0.3);
                      border-radius: 62px;
                      padding: 8px;
                      color: #fff;
                    "
                  ></i>
                </div>
              </swiper>
            </div>
          </div>
        </b-container>
      </div>
      <div class="bottomBox">
        <h4 style="font-weight: 700">立刻提升企业管理能力，助力企业腾飞！</h4>
        <h6 style="margin-top: 5px; font-weight: 700">
          咨询热线：021-22019885
        </h6>
        <router-link to="/productTrials">
          <img
            style="margin-top: 5px; width: 100px"
            src="./../assets/bottomBt.png"
          />
        </router-link>
      </div>
    </div>
  </div>
</template>
<script>
import { newsListByApprovalAndStatus } from "@/api/index";
export default {
  name: "HomeView",
  components: {},
  data() {
    return {
      iconUrlhoverIndex: -1,
      choseList: [
        {
          id: "1",
          label: "CRM客户关系管理系统",
          title: "通誉智慧外勤管家",
          checked: true,
        },
        {
          id: "2",
          label: "CRM客户关系管理系统",
          title: "通誉智慧外勤管家",
          checked: false,
        },
        {
          id: "3",
          label: "CRM客户关系管理系统",
          title: "通誉智慧外勤管家",
          checked: false,
        },
      ],
      curChosed: "1",
      tabPosition: "left",
      imgSrc1: require("./../assets/productsPic1.png"),
      imgSrc2: require("./../assets/productsPic2.png"),
      imgSrc3: require("./../assets/productsPic3.png"),
      bannerList: [
        {
          // url: require('./../assets/banner2.png')
        },
        // {
        //   url: require('./../assets/banner1.png')
        // }
      ],
      expertList: [
        {
          title: "移动办公平台",
          text: "为销售人员提供了移动办公的平台，不再局限于需要使用电脑来处理客户问题随时随地查看和处理业务，随时随地上传和下载文件，分享信息和经验。",
          iconUrl: require("./../assets/mobileWork.png"),
          iconUrl1: require("./../assets/mobileWork1.png"),
        },
        {
          title: "提供一站式解决方案",
          text: "针对企业销售管理、客户管理、分销渠道管理、促销和订单管理等问题提供解决方案，帮助企业提高销售效率优化销售流程、提升客户满意度。",
          iconUrl: require("./../assets/solution.png"),
          iconUrl1: require("./../assets/solution1.png"),
        },
        {
          title: "个性定制化",
          text: "产品可根据客户的个性化需求提供产品定制服务，以帮助企业实现销售过程的精细化管理，提升企业的管理能力和销售业绩。",
          iconUrl: require("./../assets/Personalization.png"),
          iconUrl1: require("./../assets/Personalization1.png"),
        },
      ],
      queryParams: {
        page: 1,
        limit: 12,
        type: "dgtIndustryNews",
        title: "",
      },
      loading: true,
      List: [],
      swiperOption: {
        loop: false,
        loopFillGroupWithBlank: false,
        slidesPerView: 3,
        spaceBetween: 16,
        breakpoints: {
          1024: {
            slidesPerView: 3,
            spaceBetween: 16,
          },
          768: {
            slidesPerView: 3,
            spaceBetween: 16,
          },
          640: {
            slidesPerView: 2,
            spaceBetween: 10,
          },
          320: {
            slidesPerView: 1,
            spaceBetween: 10,
          },
        },
        navigation: {
          nextEl: ".swiper-button-next",
          prevEl: ".swiper-button-prev",
        },
      },
      swiperOption1: {
        loop: false,
        loopFillGroupWithBlank: false,
        slidesPerView: 4,
        spaceBetween: 16,
        breakpoints: {
          1024: {
            slidesPerView: 4,
            spaceBetween: 16,
          },
          768: {
            slidesPerView: 3,
            spaceBetween: 16,
          },
          640: {
            slidesPerView: 2,
            spaceBetween: 10,
          },
          320: {
            slidesPerView: 1,
            spaceBetween: 10,
          },
        },
        navigation: {
          nextEl: ".swiper-button-next",
          prevEl: ".swiper-button-prev",
        },
      },
    };
  },
  mounted() {
    this.getArtlist();
  },
  methods: {
    getArtlist() {
      this.loading = true;
      newsListByApprovalAndStatus(this.queryParams).then((response) => {
        this.loading = false;
        this.List = response.data.items;
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fafafa;
}

.tabItem {
  margin: 0px 80px;
}

.tab {
  margin-top: -25px;
  z-index: 9999;
  position: relative;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: #004ca1;
  padding: 2px 40px;
  border-radius: 12px;
  border: 1px solid #ebeef5;
  background-color: #fff;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  line-height: 20px;
}

.tabActive {
  color: #fff;
  background-color: #004ca1;
}

.tabList {
  background-color: rgba(0, 80, 157, 0.08);
  backdrop-filter: blur(6px);
}
.bannerWrapper {
  width: 100%;
  height: auto;
  position: relative;
  img {
    width: 100%;
    height: auto;
  }
  .homeTit {
    position: absolute;
    width: 43%;
    top: 35%;
    left: 6%;
  }
  .homeBannerBtn {
    position: absolute;
    width: 27%;
    top: 43%;
    right: 12%;
  }
}

h3 {
  font-weight: 900;
  font-size: 32px;
}

h3,
h6 {
  text-align: center;
}

.box-card {
  /* width: 350px; */
  padding: 15px 20px;
  cursor: pointer;
}
.swiper {
  overflow: visible;
}
.swiperwrapper_slide1 {
  position: relative;
  padding-right: 24px;
  width: 25%;
}
.slideBox1::before {
  content:"";
  display: inline-block;
  width: 91%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  position: absolute;
  top: 0;
  left: 0;
}

.swiperwrapper_slide2 {
  width: 75%;
}

.slideBox1 {
  cursor: pointer;
  padding: 10px;
  height: 380px;
  width: 100%;
  background: url("./../assets/sceneryBg.png") center/cover no-repeat;
  color: #fff;
  overflow: hidden;
  // background: url('./../assets/graySlide.jpg') center/cover no-repeat;
  div {
    color: #fff !important;
    position: relative;
  }
  a{
    position: relative;

  }
}

.slideBox2 {
  cursor: pointer;
  padding: 10px;
  height: 380px;
  width: 100%;
  background-color: #f9f9fb;
  position: relative;
  border-radius: 4px;
}

.slideBox2:hover {
  background-color: #ffffff;
  box-shadow: 0 2px 12px 0 rgba(1, 95, 189, 0.15);
}

.swiper-button-prev,
.swiper-button-next {
  height: 16px !important;
  background-image: none !important;
}

.cardBox:hover {
  background-color: #fff !important;
}

.tabBox {
  background-color: #032b62;
  background-position: center center;
  background-size: auto 100%;
  background-repeat: no-repeat;
  /* background: url('./../assets/tabBox.png') center center; */
}

.bottomBox {
  background: url("./../assets/bottomBg.jpg") center/cover no-repeat;
  /* background-size: 100% 100%; */
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}

.el-tabs--left .el-tabs__item.is-left {
  text-align: left !important;
}

.box1 {
  background: #fafafa;
  // background: url('./../assets/box1.png') center center no-repeat;;
}

.box2 {
  background: url("./../assets/box2.png") center center no-repeat;
}
.itemWrapper {
  padding: 40px 14px 30px;
  border-radius: 10px;
  // background: linear-gradient(to bottom , #fafafa,#ffffff);
}
</style>