|
@@ -1,16 +1,24 @@
|
|
|
<template>
|
|
|
- <div class='Construct'>
|
|
|
+ <div class="Construct">
|
|
|
<!-- 模型的嵌套盒子 -->
|
|
|
<div class="ifrBox">
|
|
|
- <iframe src="http://4dscene.4dage.com/culturalrelics/YFYCModel/index.html#/" frameborder="0"></iframe>
|
|
|
+ <iframe
|
|
|
+ src="http://4dscene.4dage.com/culturalrelics/YFYCModel/index.html#/"
|
|
|
+ frameborder="0"
|
|
|
+ ></iframe>
|
|
|
</div>
|
|
|
<!-- 左上的场景选择 -->
|
|
|
<div class="vrChange" @click="vrShow = true">
|
|
|
- <img src="../../assets/img/construct/vrChange.png" alt="">
|
|
|
+ <img src="../../assets/img/construct/vrChange.png" alt="" />
|
|
|
<p>场景选择</p>
|
|
|
</div>
|
|
|
<!-- 右下角的搜索按钮 -->
|
|
|
- <img class="search" @click="searchShow=!searchShow" src="../../assets/img/construct/search.png" alt="">
|
|
|
+ <img
|
|
|
+ class="search"
|
|
|
+ @click="searchShow = !searchShow"
|
|
|
+ src="../../assets/img/construct/search.png"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
|
|
|
<!-- 点击左上角出来的轮播图 -->
|
|
|
<div class="vrBox" :class="{ vrBoxAc: vrShow }">
|
|
@@ -21,8 +29,13 @@
|
|
|
<div class="vrBoxSwi">
|
|
|
<div class="swiper-container">
|
|
|
<div class="swiper-wrapper">
|
|
|
- <div class="swiper-slide" v-for="i in 5" :key="i">
|
|
|
- <img src="../../assets/img/construct/sw1.png" alt="">
|
|
|
+ <div
|
|
|
+ class="swiper-slide"
|
|
|
+ @click="handlClick"
|
|
|
+ v-for="i in 5"
|
|
|
+ :key="i"
|
|
|
+ >
|
|
|
+ <img src="../../assets/img/construct/sw1.png" alt="" />
|
|
|
<p>芜湖老海关{{ i }}</p>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -35,35 +48,33 @@
|
|
|
<Search />
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
- <!-- 进入景点详情的按钮 -->
|
|
|
- <div class="toInfo" @click="$router.push('/layout/goods')">
|
|
|
- <img src="../../assets/img/construct/infoBtn.png" alt="">
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
+ <!-- 进入景点详情的按钮 -->
|
|
|
+ <div class="toInfo" @click="$router.push('/layout/goods')">
|
|
|
+ <img src="../../assets/img/construct/infoBtn.png" alt="" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import Search from './components/search.vue'
|
|
|
+import { Toast } from "vant";
|
|
|
+import Search from "./components/search.vue";
|
|
|
import Swiper from "../../assets/libs/swiper.js";
|
|
|
export default {
|
|
|
components: { Search },
|
|
|
data() {
|
|
|
return {
|
|
|
vrShow: false,
|
|
|
- searchShow: false
|
|
|
+ searchShow: false,
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
|
watch: {},
|
|
|
methods: {
|
|
|
-
|
|
|
- },
|
|
|
- created() {
|
|
|
-
|
|
|
+ handlClick() {
|
|
|
+ Toast("敬请期待!");
|
|
|
+ },
|
|
|
},
|
|
|
+ created() {},
|
|
|
mounted() {
|
|
|
new Swiper(".Construct .swiper-container", {
|
|
|
slidesPerView: 1.4,
|
|
@@ -72,14 +83,14 @@ export default {
|
|
|
initialSlide: 1,
|
|
|
});
|
|
|
},
|
|
|
- beforeCreate() { }, //生命周期 - 创建之前
|
|
|
- beforeMount() { }, //生命周期 - 挂载之前
|
|
|
- beforeUpdate() { }, //生命周期 - 更新之前
|
|
|
- updated() { }, //生命周期 - 更新之后
|
|
|
- beforeDestroy() { }, //生命周期 - 销毁之前
|
|
|
- destroyed() { }, //生命周期 - 销毁完成
|
|
|
- activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
-}
|
|
|
+ beforeCreate() {}, //生命周期 - 创建之前
|
|
|
+ beforeMount() {}, //生命周期 - 挂载之前
|
|
|
+ beforeUpdate() {}, //生命周期 - 更新之前
|
|
|
+ updated() {}, //生命周期 - 更新之后
|
|
|
+ beforeDestroy() {}, //生命周期 - 销毁之前
|
|
|
+ destroyed() {}, //生命周期 - 销毁完成
|
|
|
+ activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang='less' scoped>
|
|
|
@import "../../assets/libs/swiper.css";
|
|
@@ -112,21 +123,21 @@ export default {
|
|
|
width: 60px;
|
|
|
text-align: center;
|
|
|
|
|
|
- &>img {
|
|
|
+ & > img {
|
|
|
width: 40px;
|
|
|
}
|
|
|
|
|
|
- &>p {
|
|
|
+ & > p {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
- .toInfo{
|
|
|
+ .toInfo {
|
|
|
position: absolute;
|
|
|
bottom: 20px;
|
|
|
left: 50%;
|
|
|
transform: translateX(-50%);
|
|
|
width: 160px;
|
|
|
- &>img{
|
|
|
+ & > img {
|
|
|
width: 100%;
|
|
|
}
|
|
|
}
|
|
@@ -142,12 +153,12 @@ export default {
|
|
|
.vrBox {
|
|
|
opacity: 0;
|
|
|
pointer-events: none;
|
|
|
- transition: opacity .3s;
|
|
|
+ transition: opacity 0.3s;
|
|
|
position: absolute;
|
|
|
- z-index: 3;
|
|
|
+ z-index: 4;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
- background-color: rgba(0, 0, 0, .6);
|
|
|
+ background-color: rgba(0, 0, 0, 0.6);
|
|
|
|
|
|
.close {
|
|
|
position: absolute;
|
|
@@ -170,14 +181,14 @@ export default {
|
|
|
height: 100%;
|
|
|
|
|
|
.swiper-slide {
|
|
|
- &>img {
|
|
|
+ & > img {
|
|
|
border-radius: 8px 8px 0 0;
|
|
|
width: 100%;
|
|
|
height: calc(100% - 40px);
|
|
|
object-fit: cover;
|
|
|
}
|
|
|
|
|
|
- &>p {
|
|
|
+ & > p {
|
|
|
height: 40px;
|
|
|
line-height: 40px;
|
|
|
font-size: 18px;
|
|
@@ -185,7 +196,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -198,12 +208,12 @@ export default {
|
|
|
transform: translateX(-300px);
|
|
|
opacity: 0;
|
|
|
pointer-events: none;
|
|
|
- transition: all .3s;
|
|
|
+ transition: all 0.3s;
|
|
|
position: absolute;
|
|
|
z-index: 3;
|
|
|
left: 0;
|
|
|
width: 100%;
|
|
|
- background-color: rgba(0, 0, 0, .6);
|
|
|
+ background-color: rgba(0, 0, 0, 0.6);
|
|
|
height: 100%;
|
|
|
}
|
|
|
|