|
@@ -1,5 +1,5 @@
|
|
|
<script setup>
|
|
|
-import { ref, computed, nextTick, onMounted } from "vue"
|
|
|
+import { ref, computed, nextTick, onMounted, watch } from "vue"
|
|
|
import { useRouter, useRoute } from "vue-router"
|
|
|
import { useStore } from "vuex"
|
|
|
import Startup from "@/views/StartupView.vue"
|
|
@@ -9,6 +9,12 @@ import HotspotDetail3 from "@/views/HotspotDetail3.vue"
|
|
|
import HotspotDetail1 from "@/views/HotspotDetail1.vue"
|
|
|
import PaintingDetail from '@/views/PaintingDetail.vue'
|
|
|
|
|
|
+import DetailImg from '@/assets/images/icon_home_detail-min.png'
|
|
|
+import DetailImgAc from '@/assets/images/icon_home_detail-min-ac.png'
|
|
|
+import AuthorImg from '@/assets/images/icon_home_author-min.png'
|
|
|
+import AuthorImgAc from '@/assets/images/icon_home_author-min-ac.png'
|
|
|
+
|
|
|
+
|
|
|
const store = useStore()
|
|
|
const router = useRouter()
|
|
|
const route = useRoute()
|
|
@@ -52,6 +58,20 @@ const longTitleText = computed(() => {
|
|
|
: ""
|
|
|
})
|
|
|
|
|
|
+const isShowHotspot = ref(true)
|
|
|
+watch(curPageIndex, (val) => {
|
|
|
+ if (val == 0 || val == 4) {
|
|
|
+ setTimeout(() => {
|
|
|
+ isShowHotspot.value = true
|
|
|
+ }, 1500)
|
|
|
+ }
|
|
|
+ isShowHotspot.value = false
|
|
|
+})
|
|
|
+
|
|
|
+// const isShowHotspot = computed(setTimeout(()=> {
|
|
|
+// return curPageIndex.value == 0 || curPageIndex.value == 4
|
|
|
+// }, 1500))
|
|
|
+
|
|
|
// 滑动逻辑
|
|
|
const scrollFu = (val) => {
|
|
|
if (val == -1) {
|
|
@@ -77,6 +97,10 @@ const scrollFu = (val) => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+const hoverIndex = ref(null)
|
|
|
+
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
if (route.query.page) {
|
|
|
curPageIndex.value = parseInt(route.query.page)
|
|
@@ -88,7 +112,7 @@ onMounted(() => {
|
|
|
<div class="home">
|
|
|
<!-- 过渡到更多详情页视频 -->
|
|
|
<video
|
|
|
- v-if="isShowVideoFadeToNextPage"
|
|
|
+ v-show="isShowVideoFadeToNextPage"
|
|
|
ref="videoFadeToNextPageEl"
|
|
|
muted
|
|
|
class="fade-to-next-page"
|
|
@@ -144,7 +168,7 @@ onMounted(() => {
|
|
|
draggable="false"
|
|
|
>
|
|
|
<div class="sub-text">
|
|
|
- 南京博物院<br>
|
|
|
+ <!-- 南京博物院<br> -->
|
|
|
绢本 墨笔<br>
|
|
|
元 李衎<br>
|
|
|
</div>
|
|
@@ -159,6 +183,8 @@ onMounted(() => {
|
|
|
>
|
|
|
<div
|
|
|
class="page2-box"
|
|
|
+ @mouseenter="hoverIndex = 1"
|
|
|
+ @mouseleave="hoverIndex = null"
|
|
|
@click="
|
|
|
// () => {
|
|
|
// router.push('/painting-detail?idx=home');
|
|
@@ -168,7 +194,7 @@ onMounted(() => {
|
|
|
"
|
|
|
>
|
|
|
<img
|
|
|
- src="@/assets/images/icon_home_detail-min.png"
|
|
|
+ :src="hoverIndex == 1 ? DetailImgAc : DetailImg"
|
|
|
alt=""
|
|
|
>
|
|
|
<div>作品简介</div>
|
|
@@ -176,6 +202,8 @@ onMounted(() => {
|
|
|
<div
|
|
|
class="page2-box"
|
|
|
style="margin-top: 10px"
|
|
|
+ @mouseenter="hoverIndex = 2"
|
|
|
+ @mouseleave="hoverIndex = null"
|
|
|
@click="
|
|
|
// () => {
|
|
|
// router.push('/painting-detail?idx=home&state=2');
|
|
@@ -185,7 +213,7 @@ onMounted(() => {
|
|
|
"
|
|
|
>
|
|
|
<img
|
|
|
- src="@/assets/images/icon_home_author-min.png"
|
|
|
+ :src="hoverIndex == 2 ? AuthorImgAc : AuthorImg"
|
|
|
alt=""
|
|
|
>
|
|
|
<div>作者简介</div>
|
|
@@ -201,7 +229,7 @@ onMounted(() => {
|
|
|
}"
|
|
|
@click="
|
|
|
() => {
|
|
|
- curPageIndex == 1 ? (curPageIndex = 2) : '';
|
|
|
+ isShowPaintingDetial = true
|
|
|
}
|
|
|
"
|
|
|
>
|
|
@@ -254,14 +282,17 @@ onMounted(() => {
|
|
|
</div>
|
|
|
|
|
|
<!-- 热点层1 -->
|
|
|
- <div class="hotspot-wrap">
|
|
|
+ <div
|
|
|
+ class="hotspot-wrap"
|
|
|
+ :style="{opacity: isShowHotspot ?1:0}"
|
|
|
+ >
|
|
|
<HotspotForHomepage
|
|
|
- v-show="curPageIndex == 0 || curPageIndex == 4"
|
|
|
+
|
|
|
class="hotspot-1"
|
|
|
@click="isShowHotspotDetail1 = true"
|
|
|
/>
|
|
|
<HotspotForHomepage
|
|
|
- v-show="curPageIndex == 0 || curPageIndex == 4"
|
|
|
+
|
|
|
class="hotspot-3"
|
|
|
@click="isShowHotspotDetail3 = true"
|
|
|
/>
|
|
@@ -447,7 +478,8 @@ onMounted(() => {
|
|
|
left: 50%;
|
|
|
top: 50%;
|
|
|
width: 551.84px;
|
|
|
- height: 937.05px;
|
|
|
+ // height: 937.05px;
|
|
|
+ height: 100%;
|
|
|
// background: green;
|
|
|
transform: translate(-50%, -50%);
|
|
|
z-index: 1;
|
|
@@ -461,13 +493,14 @@ onMounted(() => {
|
|
|
|
|
|
> .painting-stem {
|
|
|
width: 80%;
|
|
|
+ // height: 75%;
|
|
|
height: calc(
|
|
|
371 / v-bind("windowSizeWhenDesignForRef") *
|
|
|
v-bind("windowSizeInCssForRef")
|
|
|
);
|
|
|
position: absolute;
|
|
|
left: 50%;
|
|
|
- transform: translate(-50%, 26%);
|
|
|
+ transform: translate(-50%, 22%);
|
|
|
transition: opacity 1.5s ease;
|
|
|
}
|
|
|
}
|
|
@@ -491,13 +524,14 @@ onMounted(() => {
|
|
|
top: 50%;
|
|
|
transform: translate(-46%, -50%);
|
|
|
width: 551.84px;
|
|
|
- height: 937.05px;
|
|
|
+ // height: 937.05px;
|
|
|
+ height: 100%;
|
|
|
z-index: 7;
|
|
|
pointer-events: none;
|
|
|
will-change: transform;
|
|
|
backface-visibility: hidden;
|
|
|
z-index: 10;
|
|
|
- transition: opacity 1.5s ease;
|
|
|
+ transition: opacity 0.5s ease;
|
|
|
|
|
|
& > div {
|
|
|
z-index: 100;
|
|
@@ -555,7 +589,7 @@ onMounted(() => {
|
|
|
transform: translateY(-50%);
|
|
|
left: 10%;
|
|
|
color: #ffffff;
|
|
|
- font-size: 30px;
|
|
|
+ font-size: 25px;
|
|
|
line-height: 38px;
|
|
|
font-family: "KaiTi";
|
|
|
transition: opacity 1.5s ease;
|