<template>
  <div class="home">
    <div class="recommend-list">
      <div class="recommend-item">
        <div class="recommend-item-container boutique">
          <!-- <NavBar class="navBar" /> -->
          <el-carousel height="100vh" style="width: 100%">
            <el-carousel-item
              v-for="(item, index) in ['精品展1', '精品展2', '精品展3']"
              :key="index"
            >
              <h3
                class="small"
                style="
                  height: 100%;
                  display: flex;
                  justify-content: center;
                  align-items: center;
                "
              >
                {{ item }}
              </h3>
            </el-carousel-item>
          </el-carousel>
        </div>
        <div class="recommend-item-container virtural">
          <div class="img" @click="handleClickVitual()">
            <img src="@/assets/imgs/virtual/1.png" alt="" />
            <div class="desc">
              <span class="name">贵州世居民族展历史篇</span>——
              <span class="deptName">贵州省民族博物馆</span>
            </div>
            <div class="play">
              <i class="el-icon-caret-right"></i>
            </div>
          </div>
        </div>
        <div class="recommend-item-container display">每日推送-布展</div>
        <div class="recommend-item-container culturalRelic">每日推送-文物</div>
        <div class="recommend-item-container musuem-map">文博地图</div>
        <!-- <MuseumMap /> -->
      </div>
    </div>
    <!-- <Footer /> -->
  </div>
</template>

<script>
import NavBar from "@/components/NavBar";
import Footer from "@/components/Footer";
import MuseumMap from "./components/MuseumMap.vue";
export default {
  components: { NavBar, Footer, MuseumMap },
  name: "Home",
  data() {
    return {
      dataList: [
        {
          id: 0,
          key: "boutique",
          label: "精品展推荐",
          imgs: ["精品展1图片", "精品展2图片"],
          color: "#869b94",
        },
        {
          id: 2,
          key: "virtual",
          label: "虚拟展厅推荐",
          color: "#f3ecef",
        },
        {
          id: 3,
          key: "display",
          label: "布展推荐",
          color: "#607271",
        },
        {
          id: 4,
          key: "culturalRelic",
          label: "文物推荐",
          color: "#f3ecef",
        },
        {
          id: 5,
          key: "文博地图",
          label: "museum",
          color: "#7c918a",
        },
      ],
    };
  },
  methods: {
    handleClickVitual() {
      //暂时写死
      window.open(
        "https://720yun.com/t/6cvkbyf7z7w?scene_id=90524980#scene_id=90524980"
      );
    },
  },
};
</script>

<style lang="scss" scoped>
.virtural {
  .img {
    width: 100%;
    position: relative;
    overflow: hidden;
    // background-color: #fff;
    cursor: pointer;
    &:hover {
      img {
        transform: scale(1.1);
      }
      // .play {
      //   width: 56px;
      //   height: 56px;
      //   i {
      //     font-size: 46px;
      //     color: #fff;
      //   }
      // }
    }
    img {
      width: 100%;
      height: 100%;
      transition: all 0.5s ease;
    }
    .desc {
      position: absolute;
      width: 100%;
      padding: 10px;
      background-color: #fff;
      opacity: 0.7;
      bottom: 0;
      left: 0;
    }
    .play {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      border: 2px solid #fff;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      display: flex;
      justify-content: center;
      align-items: center;
      i {
        font-size: 40px;
        color: #fff;
      }
    }
  }
}
.recommend-list {
  display: flex;
  flex-direction: column;
  .recommend-item {
    .recommend-item-container {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      width: 100%;
    }
    .boutique {
      position: relative;
      flex-direction: column;
      .navBar {
        position: absolute;
        top: 0;
        z-index: 999;
        // left: 0;
      }
    }
  }
}
</style>