<template>
  <div class="index-product-box">
    <div class="flex-item">
      <div class="product-title-box">
        <div class="title-font1">使用我们强大的 API 和智莺四大业务云</div>
        <div class="title-font2">
          经过多年的深耕，不断积累和各头部用户的深入合作的经验。并结合当前主流的导购应用设计，为您的导购事业保驾护航
        </div>
      </div>

      <div class="data-box">
        <div
          v-for="(item, index) in pageData"
          :key="index"
          class="data-item"
          :class="{ isDataColor: isDataStatus === item.id }"
          @click="isDataStatus = item.id"
        >
          <img class="item-img" :src="item.img" alt="" />
          <div class="item-title">{{ item.title }}</div>
          <div class="item-content">{{ item.content }}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "page-product",
  data() {
    return {
      isDataStatus: "1",
      pageData: [
        {
          img: require("@/static/img/item-1.png"),
          title: "标准API",
          content:
            "通过有赞云开放的标准化API，可为有赞商家迅速搭建标准化场景应用",
          id: "1",
        },
        {
          img: require("@/static/img/item-2.png"),
          title: "页面定制",
          content:
            "可随意开发个性化的前端页面，满足买家不同场景不同行业的购物体验",
          id: "2",
        },
        {
          img: require("@/static/img/item-3.png"),
          title: "扩展点应用",
          content: "开发者可以自由嵌入自定义流程节点，构建全新的业务逻辑",
          id: "3",
        },
        {
          img: require("@/static/img/item-4.png"),
          title: "四端定制",
          content: "支持PC，H5，小程序，App四端定制基于多端的业务场景",
          id: "4",
        },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.index-product-box {
  display: flex;
  width: 100vw;
  justify-content: center;
  .flex-item {
    width: 1200px;
    height: 100%;
    flex-flow: column; //垂直排列
    .product-title-box {
      justify-content: space-between; //两端对齐
      flex-flow: column; //垂直排列
      display: flex;
      height: 237px;
      box-sizing: border-box;
      padding: 67px 0 80px;
      text-align: center;
      margin: 0 auto;
      width: 630px;
      .title-font1 {
        color: #333333;
        font-size: 26px;
        font-weight: bold;
      }
      .title-font2 {
        color: #999999;
        font-size: 16px;
        line-height: 21px;
      }
    }
    .data-box {
      display: flex;
      .data-item {
        margin-right: 20px;
        width: 284px;
        height: 375px;
        box-sizing: border-box;
        border-radius: 22px;
        border: 2px solid #1d8aff;
        text-align: center;
        padding: 73px 32px 44px;
        cursor: pointer;
        background: #fff;
        transition: background-color 0.4s;
        .item-title {
          color: #333333;
          margin: 37px 0 12px;
          font-size: 22px;
          line-height: 22px;
          transition: color 0.4s;
        }
        .item-content {
          color: #999999;
          font-size: 16px;
          line-height: 30px;
          transition: color 0.4s;
        }
        .item-img {
          width: 90px;
          height: 90px;
        }
      }
      .data-item:last-child {
        margin: 0;
      }

      .isDataColor {
        background-color: #1890ff;
        transition: box-shadow background-color 0.4s;
        box-shadow: 0px 0px 20px 0px rgba(24, 144, 255, 0.4);

        .item-title {
          color: #ffffff;
          transition: color 0.4s;
        }
        .item-content {
          color: #a2d2ff;
          transition: color 0.4s;
        }
      }
    }
  }
}
</style>
