|
@@ -6,9 +6,13 @@ import ModelList, { baseURL } from "@/assets/data/Model";
|
|
|
|
|
|
import Page from "@/assets/img/map/page.png";
|
|
|
import PageAc from "@/assets/img/map/pageAc.png";
|
|
|
+import { useVideo } from '@/store/Video';
|
|
|
+
|
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
+const store = useVideo();
|
|
|
+
|
|
|
const currentScene = ref({
|
|
|
name: "义德堂",
|
|
|
adress: "芜湖市新芜区滨江北路",
|
|
@@ -35,7 +39,7 @@ const newModelList = computed(() => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-nextTick(() => {});
|
|
|
+nextTick(() => { });
|
|
|
onMounted(() => {
|
|
|
//视频自动播放
|
|
|
currentScene.value = newModelList.value[0];
|
|
@@ -55,6 +59,7 @@ onMounted(() => {
|
|
|
nextEl: ".swiper-button-next",
|
|
|
prevEl: ".swiper-button-prev",
|
|
|
},
|
|
|
+ // initialSlide: store.currentIndex == null ? 0 : store.currentIndex,
|
|
|
// 到分页器
|
|
|
pagination: {
|
|
|
el: ".swiper-pagination",
|
|
@@ -69,6 +74,7 @@ onMounted(() => {
|
|
|
slideChange: function (swiper: any) {
|
|
|
nextTick(() => {
|
|
|
const index = swiper.activeIndex;
|
|
|
+ store.currentIndex = index
|
|
|
currentIndex.value = index;
|
|
|
swiperRef2.slideTo(index); // 这里就报错 没有swiper2这个东西
|
|
|
});
|
|
@@ -80,6 +86,7 @@ onMounted(() => {
|
|
|
spaceBetween: 30,
|
|
|
effect: "coverflow",
|
|
|
centeredSlides: true,
|
|
|
+ // initialSlide: store.currentIndex == null ? 0 : store.currentIndex,
|
|
|
coverflowEffect: {
|
|
|
rotate: 50,
|
|
|
stretch: 10,
|
|
@@ -109,7 +116,7 @@ onMounted(() => {
|
|
|
});
|
|
|
|
|
|
// home视频开关
|
|
|
-const isHomeVideo = ref(true);
|
|
|
+const isHomeVideo = ref(store.currentIndex == null ? true : false);
|
|
|
|
|
|
watch(currentIndex, (newVale: any) => {
|
|
|
currentScene.value = newModelList.value[newVale];
|
|
@@ -125,7 +132,7 @@ watch(currentIndex, (newVale: any) => {
|
|
|
<div class="content">
|
|
|
<div class="info">
|
|
|
<!-- currentIndex在这里试 -->
|
|
|
- <div class="info-title" v-if="currentIndex >= 0">
|
|
|
+ <div class="info-title" v-show="currentIndex >= 0">
|
|
|
{{ currentScene.fullName }}
|
|
|
</div>
|
|
|
<div class="info-adresss">
|
|
@@ -136,30 +143,14 @@ watch(currentIndex, (newVale: any) => {
|
|
|
<div class="option-box">
|
|
|
<div class="swiper-container main-slider" ref="swiperRef">
|
|
|
<div class="swiper-wrapper">
|
|
|
- <div
|
|
|
- class="swiper-slide option-item"
|
|
|
- v-for="(item, index) in newModelList"
|
|
|
- :key="index"
|
|
|
- @click="goToVodio(item.name)"
|
|
|
- >
|
|
|
+ <div class="swiper-slide option-item" v-for="(item, index) in newModelList" :key="index"
|
|
|
+ @click="goToVodio(item.videoName)">
|
|
|
<!-- 边框图片 -->
|
|
|
- <img
|
|
|
- class="border-img"
|
|
|
- :src="`${baseURL}/thumbnail/border.png`"
|
|
|
- alt=""
|
|
|
- />
|
|
|
+ <img class="border-img" :src="`${baseURL}/thumbnail/border.png`" alt="" />
|
|
|
<!-- 普通图片 -->
|
|
|
- <img
|
|
|
- class="nornal-img"
|
|
|
- :src="getAssetURL(`${item.name}.png`)"
|
|
|
- alt=""
|
|
|
- />
|
|
|
+ <img class="nornal-img" :src="getAssetURL(`${item.name}.png`)" alt="" />
|
|
|
<!-- 播放图片 -->
|
|
|
- <img
|
|
|
- class="play-icon"
|
|
|
- src="../../assets/img/video/play.png"
|
|
|
- alt=""
|
|
|
- />
|
|
|
+ <img class="play-icon" src="../../assets/img/video/play.png" alt="" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 分页器-->
|
|
@@ -174,17 +165,12 @@ watch(currentIndex, (newVale: any) => {
|
|
|
<div class="module-box">
|
|
|
<div class="swiper-container sub-slider" ref="swiperRef2">
|
|
|
<div class="swiper-wrapper">
|
|
|
- <div
|
|
|
- class="swiper-slide option-item active"
|
|
|
- v-for="(item, index) in newModelList"
|
|
|
- :key="index"
|
|
|
- :style="{
|
|
|
- background: 'none',
|
|
|
- boxShadow: 'none',
|
|
|
- display: 'flex',
|
|
|
- justifyContent: 'center',
|
|
|
- }"
|
|
|
- >
|
|
|
+ <div class="swiper-slide option-item active" v-for="(item, index) in newModelList" :key="index" :style="{
|
|
|
+ background: 'none',
|
|
|
+ boxShadow: 'none',
|
|
|
+ display: 'flex',
|
|
|
+ justifyContent: 'center',
|
|
|
+ }">
|
|
|
<img :src="`${baseURL}/image/module/${item.code}.png`" alt="" />
|
|
|
</div>
|
|
|
</div>
|
|
@@ -194,25 +180,15 @@ watch(currentIndex, (newVale: any) => {
|
|
|
</div>
|
|
|
<!-- 视频播放窗口 -->
|
|
|
<div class="video-top" v-if="isHomeVideo">
|
|
|
- <video
|
|
|
- id="videoHome"
|
|
|
- src="https://houseoss.4dkankan.com/project/yifangyice2/video/home.mp4"
|
|
|
- @ended="
|
|
|
- () => {
|
|
|
- isHomeVideo = false;
|
|
|
- }
|
|
|
- "
|
|
|
- autoplay
|
|
|
- controls
|
|
|
- ></video>
|
|
|
- <div
|
|
|
- class="close-icon"
|
|
|
- @click="
|
|
|
- () => {
|
|
|
- isHomeVideo = false;
|
|
|
- }
|
|
|
- "
|
|
|
- >
|
|
|
+ <video id="videoHome" playsinline="true" x5-video-player-type="h5"
|
|
|
+ src="https://houseoss.4dkankan.com/project/yifangyice2/video/home.mp4" @ended="() => {
|
|
|
+ isHomeVideo = false;
|
|
|
+ }
|
|
|
+ " autoplay controls></video>
|
|
|
+ <div class="close-icon" @click="() => {
|
|
|
+ isHomeVideo = false;
|
|
|
+ }
|
|
|
+ ">
|
|
|
跳过
|
|
|
</div>
|
|
|
<!-- <img
|
|
@@ -294,6 +270,7 @@ watch(currentIndex, (newVale: any) => {
|
|
|
width: 100vw;
|
|
|
height: 100vh;
|
|
|
overflow: hidden;
|
|
|
+
|
|
|
.map-top {
|
|
|
width: 100%;
|
|
|
height: 8vh;
|
|
@@ -305,17 +282,20 @@ watch(currentIndex, (newVale: any) => {
|
|
|
color: #4d4d4d;
|
|
|
// position: absolute;
|
|
|
}
|
|
|
+
|
|
|
.bg-top {
|
|
|
height: 40vh;
|
|
|
width: 100%;
|
|
|
background: linear-gradient(to bottom, #484848 80%, #464646ab);
|
|
|
}
|
|
|
+
|
|
|
.bg-bottom {
|
|
|
height: calc(100% - 40vh);
|
|
|
width: 100%;
|
|
|
// background: green;
|
|
|
background: #fffff7;
|
|
|
}
|
|
|
+
|
|
|
.content {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
@@ -326,15 +306,18 @@ watch(currentIndex, (newVale: any) => {
|
|
|
max-width: 100vw;
|
|
|
max-height: 100vh;
|
|
|
overflow: hidden;
|
|
|
+
|
|
|
// background: rgba(255, 0, 0, 0.199);
|
|
|
.info {
|
|
|
margin-top: 30px;
|
|
|
margin-left: 15px;
|
|
|
+
|
|
|
&-title {
|
|
|
font-size: 1.4rem;
|
|
|
font-weight: 800;
|
|
|
letter-spacing: 4px;
|
|
|
}
|
|
|
+
|
|
|
&-adresss {
|
|
|
font-size: 0.8rem;
|
|
|
font-weight: 400;
|
|
@@ -358,6 +341,7 @@ watch(currentIndex, (newVale: any) => {
|
|
|
|
|
|
.option-box {
|
|
|
margin-top: 3vh;
|
|
|
+
|
|
|
.option-item {
|
|
|
color: black;
|
|
|
// background: url(/src\assets\img\video\itembg.png);
|
|
@@ -384,6 +368,7 @@ watch(currentIndex, (newVale: any) => {
|
|
|
height: 100%;
|
|
|
z-index: 2;
|
|
|
}
|
|
|
+
|
|
|
.nornal-img {
|
|
|
// border-radius: 40px;
|
|
|
// mask-image: linear-gradient(
|
|
@@ -392,6 +377,7 @@ watch(currentIndex, (newVale: any) => {
|
|
|
// rgba(0, 0, 0, 0) 50%
|
|
|
// );
|
|
|
}
|
|
|
+
|
|
|
.play-icon {
|
|
|
width: 20vw;
|
|
|
height: 20vw;
|
|
@@ -401,8 +387,10 @@ watch(currentIndex, (newVale: any) => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.module-box {
|
|
|
margin-top: -16%;
|
|
|
+
|
|
|
img {
|
|
|
height: 72%;
|
|
|
}
|
|
@@ -412,10 +400,12 @@ watch(currentIndex, (newVale: any) => {
|
|
|
transform: translate3d(0, 20px, 0);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.pagination {
|
|
|
max-width: 100%;
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
+
|
|
|
img {
|
|
|
width: 10px;
|
|
|
margin-right: 3px;
|
|
@@ -423,6 +413,7 @@ watch(currentIndex, (newVale: any) => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.video-top {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
@@ -435,10 +426,12 @@ watch(currentIndex, (newVale: any) => {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
+
|
|
|
video {
|
|
|
width: 100vw;
|
|
|
margin: auto auto 0 auto;
|
|
|
}
|
|
|
+
|
|
|
.close-icon {
|
|
|
border-radius: 50px;
|
|
|
border: 1px solid white;
|