|
@@ -34,7 +34,9 @@
|
|
|
<div
|
|
|
class="painting-wrap"
|
|
|
:style="{
|
|
|
- top: `${paintingTop / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`
|
|
|
+ top: `${paintingTop / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
|
|
|
+ width: `${paintingWidth / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
|
|
|
+ height: `${paintingHeight / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
|
|
|
}"
|
|
|
>
|
|
|
<div
|
|
@@ -114,17 +116,17 @@
|
|
|
top: `${paintingTop / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`
|
|
|
}"
|
|
|
>
|
|
|
- <HotspotComp
|
|
|
+ <HotspotForHomepage
|
|
|
v-show="isShowHotspot"
|
|
|
class="hotspot-1"
|
|
|
@click="isShowHotspotDetail1 = true"
|
|
|
/>
|
|
|
- <HotspotComp
|
|
|
+ <HotspotForHomepage
|
|
|
v-show="isShowHotspot"
|
|
|
class="hotspot-2"
|
|
|
@click="showBigPainting"
|
|
|
/>
|
|
|
- <HotspotComp
|
|
|
+ <HotspotForHomepage
|
|
|
v-show="isShowHotspot"
|
|
|
class="hotspot-3"
|
|
|
@click="isShowHotspotDetail3 = true"
|
|
@@ -136,7 +138,7 @@
|
|
|
ref="longDesc"
|
|
|
class="long-desc"
|
|
|
:style="{
|
|
|
- top: `${(paintingTop + 540) / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
|
|
|
+ top: `${(paintingTop + paintingHeight + 53) / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
|
|
|
opacity: longDescOpacity,
|
|
|
}"
|
|
|
>
|
|
@@ -192,6 +194,38 @@
|
|
|
{{ summaryDesc }}
|
|
|
</div>
|
|
|
|
|
|
+ <div
|
|
|
+ class="progress-bar"
|
|
|
+ >
|
|
|
+ <div class="bar-artwork-desc" />
|
|
|
+ <img
|
|
|
+ class="progress-bar-node-1"
|
|
|
+ src="@/assets/images/progress-bar-node-1.png"
|
|
|
+ alt=""
|
|
|
+ draggable="false"
|
|
|
+ >
|
|
|
+ <div class="bar-author-desc" />
|
|
|
+ <img
|
|
|
+ class="progress-bar-node-2"
|
|
|
+ src="@/assets/images/progress-bar-node-2.png"
|
|
|
+ alt=""
|
|
|
+ draggable="false"
|
|
|
+ >
|
|
|
+ <div class="bar-artwork-enjoy" />
|
|
|
+ <img
|
|
|
+ class="progress-bar-node-3"
|
|
|
+ src="@/assets/images/progress-bar-node-3.png"
|
|
|
+ alt=""
|
|
|
+ draggable="false"
|
|
|
+ >
|
|
|
+
|
|
|
+ <div
|
|
|
+ class="mask"
|
|
|
+ :style="{
|
|
|
+ width: `${(1 - scrollerElScrollTop / summaryHideAt) * 100}%`,
|
|
|
+ }"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
<OperationTip
|
|
|
v-if="isStartupOver"
|
|
|
class="operation-tip"
|
|
@@ -202,10 +236,13 @@
|
|
|
<div
|
|
|
ref="scrollerEl"
|
|
|
class="scroller"
|
|
|
- @touchstart="handletouchstart($event)"
|
|
|
- @touchmove="touchMove($event)"
|
|
|
>
|
|
|
- <div class="inner" />
|
|
|
+ <div
|
|
|
+ class="inner"
|
|
|
+ :style="{
|
|
|
+ height: summaryHideAt + windowHeight + 'px',
|
|
|
+ }"
|
|
|
+ />
|
|
|
</div>
|
|
|
|
|
|
<!-- 热点详情页 -->
|
|
@@ -263,6 +300,12 @@
|
|
|
})"
|
|
|
/>
|
|
|
</Transition>
|
|
|
+ <BtnClickMe
|
|
|
+ class="go-next-page"
|
|
|
+ text="点击继续"
|
|
|
+ :is-show="isShowBtnGoNextPage"
|
|
|
+ @click="onClickGoNextPage"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -276,6 +319,9 @@ import HotspotDetail1 from '@/views/HotspotDetail1.vue'
|
|
|
// import PaintingDetail from '@/views/PaintingDetail.vue'
|
|
|
import HotspotDetail3 from '@/views/HotspotDetail3.vue'
|
|
|
import { api as viewerApi } from 'v-viewer'
|
|
|
+import { useWindowSize } from '@vueuse/core'
|
|
|
+
|
|
|
+const { width: windowWidth, height: windowHeight } = useWindowSize()
|
|
|
|
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
@@ -327,124 +373,197 @@ const unwatch = watch(haveShownStartup, (v) => {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+
|
|
|
+const titleHideAt = window.innerHeight * 0
|
|
|
+const titleHideFinishAt = window.innerHeight * 0.75
|
|
|
const titleOpacity = computed(() => {
|
|
|
let ret = null
|
|
|
- if (scrollerElScrollTop.value <= window.innerHeight * 0.3) {
|
|
|
- ret = 1 - (window.innerHeight * 0.3 - scrollerElScrollTop.value) / (window.innerHeight * 0.3)
|
|
|
- } else if (scrollerElScrollTop.value > window.innerHeight * 0.3 && scrollerElScrollTop.value < window.innerHeight * 0.5) {
|
|
|
+ if (scrollerElScrollTop.value <= titleHideAt) {
|
|
|
ret = 1
|
|
|
} else {
|
|
|
- ret = 1 - (scrollerElScrollTop.value - window.innerHeight * 0.5) / (window.innerHeight * (0.75 - 0.5))
|
|
|
+ ret = 1 - (scrollerElScrollTop.value - titleHideAt) / (titleHideFinishAt - titleHideAt)
|
|
|
}
|
|
|
return ret
|
|
|
})
|
|
|
|
|
|
+const paintingMoveUpAt = window.innerHeight * 0
|
|
|
+const paintingTopInitial = 236
|
|
|
+const paintingMoveUpFinishAt = window.innerHeight * 1
|
|
|
+const paintingTopMovedUp = 41
|
|
|
+const paintingMoveDownAt = window.innerHeight * 2
|
|
|
+const paintingMoveDownFinishAt = window.innerHeight * 2.5
|
|
|
+const paingtingTopMovedDown = 90
|
|
|
const paintingTop = computed(() => {
|
|
|
let ret = null
|
|
|
- if (scrollerElScrollTop.value <= window.innerHeight * 0.5) {
|
|
|
- ret = 180
|
|
|
- } else if (scrollerElScrollTop.value > window.innerHeight * 0.5 && scrollerElScrollTop.value < window.innerHeight * 1) {
|
|
|
- ret = (scrollerElScrollTop.value - window.innerHeight * 0.5) / (window.innerHeight * (1 - 0.5)) * (67 - 180) + 180
|
|
|
+ if (scrollerElScrollTop.value <= paintingMoveUpAt) {
|
|
|
+ ret = paintingTopInitial
|
|
|
+ } else if (scrollerElScrollTop.value > paintingMoveUpAt && scrollerElScrollTop.value <= paintingMoveUpFinishAt) {
|
|
|
+ ret = (scrollerElScrollTop.value - paintingMoveUpAt) / (paintingMoveUpFinishAt - paintingMoveUpAt) * (paintingTopMovedUp - paintingTopInitial) + paintingTopInitial
|
|
|
+ } else if (scrollerElScrollTop.value > paintingMoveUpFinishAt && scrollerElScrollTop.value <= paintingMoveDownAt) {
|
|
|
+ ret = paintingTopMovedUp
|
|
|
+ } else if (scrollerElScrollTop.value > paintingMoveDownAt && scrollerElScrollTop.value <= paintingMoveDownFinishAt) {
|
|
|
+ ret = (scrollerElScrollTop.value - paintingMoveDownAt) / (paintingMoveDownFinishAt - paintingMoveDownAt) * (paingtingTopMovedDown - paintingTopMovedUp) + paintingTopMovedUp
|
|
|
+ } else {
|
|
|
+ ret = paingtingTopMovedDown
|
|
|
+ }
|
|
|
+ return ret
|
|
|
+})
|
|
|
+
|
|
|
+const paintingWidthInitial = 308
|
|
|
+const paintingWidthMovedUp = 250
|
|
|
+const paintingWidthMovedDown = 308
|
|
|
+const paintingWidth = computed(() => {
|
|
|
+ let ret = null
|
|
|
+ if (scrollerElScrollTop.value <= paintingMoveUpAt) {
|
|
|
+ ret = paintingWidthInitial
|
|
|
+ } else if (scrollerElScrollTop.value > paintingMoveUpAt && scrollerElScrollTop.value <= paintingMoveUpFinishAt) {
|
|
|
+ ret = (scrollerElScrollTop.value - paintingMoveUpAt) / (paintingMoveUpFinishAt - paintingMoveUpAt) * (paintingWidthMovedUp - paintingWidthInitial) + paintingWidthInitial
|
|
|
+ } else if (scrollerElScrollTop.value > paintingMoveUpFinishAt && scrollerElScrollTop.value <= paintingMoveDownAt) {
|
|
|
+ ret = paintingWidthMovedUp
|
|
|
+ } else if (scrollerElScrollTop.value > paintingMoveDownAt && scrollerElScrollTop.value <= paintingMoveDownFinishAt) {
|
|
|
+ ret = (scrollerElScrollTop.value - paintingMoveDownAt) / (paintingMoveDownFinishAt - paintingMoveDownAt) * (paintingWidthMovedDown - paintingWidthMovedUp) + paintingWidthMovedUp
|
|
|
+ } else {
|
|
|
+ ret = paintingWidthMovedDown
|
|
|
+ }
|
|
|
+ return ret
|
|
|
+})
|
|
|
+
|
|
|
+const paintingHeightInitial = 523
|
|
|
+const paintingHeightMovedUp = 425
|
|
|
+const paintingHeightMovedDown = 523
|
|
|
+const paintingHeight = computed(() => {
|
|
|
+ let ret = null
|
|
|
+ if (scrollerElScrollTop.value <= paintingMoveUpAt) {
|
|
|
+ ret = paintingHeightInitial
|
|
|
+ } else if (scrollerElScrollTop.value > paintingMoveUpAt && scrollerElScrollTop.value <= paintingMoveUpFinishAt) {
|
|
|
+ ret = (scrollerElScrollTop.value - paintingMoveUpAt) / (paintingMoveUpFinishAt - paintingMoveUpAt) * (paintingHeightMovedUp - paintingHeightInitial) + paintingHeightInitial
|
|
|
+ } else if (scrollerElScrollTop.value > paintingMoveUpFinishAt && scrollerElScrollTop.value <= paintingMoveDownAt) {
|
|
|
+ ret = paintingHeightMovedUp
|
|
|
+ } else if (scrollerElScrollTop.value > paintingMoveDownAt && scrollerElScrollTop.value <= paintingMoveDownFinishAt) {
|
|
|
+ ret = (scrollerElScrollTop.value - paintingMoveDownAt) / (paintingMoveDownFinishAt - paintingMoveDownAt) * (paintingHeightMovedDown - paintingHeightMovedUp) + paintingHeightMovedUp
|
|
|
} else {
|
|
|
- ret = 67
|
|
|
+ ret = paintingHeightMovedDown
|
|
|
}
|
|
|
return ret
|
|
|
})
|
|
|
|
|
|
const longDesc = ref(null)
|
|
|
+const longDescShowFinishAt = window.innerHeight * 0.5
|
|
|
+const longDescHideAt = longDescShowFinishAt + window.innerHeight * 1
|
|
|
+const longDescHideFinishAt = longDescHideAt + window.innerHeight * 0.5
|
|
|
const longDescOpacity = computed(() => {
|
|
|
let ret = null
|
|
|
- if (scrollerElScrollTop.value <= window.innerHeight * 0.3) {
|
|
|
- ret = 1 - (window.innerHeight * 0.3 - scrollerElScrollTop.value) / (window.innerHeight * 0.3)
|
|
|
- } else if (scrollerElScrollTop.value > window.innerHeight * 0.3 && scrollerElScrollTop.value < window.innerHeight * 2) {
|
|
|
+ if (scrollerElScrollTop.value <= longDescShowFinishAt) {
|
|
|
+ ret = 1 - (longDescShowFinishAt - scrollerElScrollTop.value) / (longDescShowFinishAt)
|
|
|
+ } else if (scrollerElScrollTop.value > longDescShowFinishAt && scrollerElScrollTop.value < longDescHideAt) {
|
|
|
ret = 1
|
|
|
} else {
|
|
|
- ret = 1 - (scrollerElScrollTop.value - window.innerHeight * 2) / (window.innerHeight * (3 - 2))
|
|
|
+ ret = 1 - (scrollerElScrollTop.value - longDescHideAt) / (longDescHideFinishAt - longDescHideAt)
|
|
|
}
|
|
|
return ret
|
|
|
})
|
|
|
watch(scrollerElScrollTop, (vNew, vOld) => {
|
|
|
- if (vNew > window.innerHeight * 1) {
|
|
|
- longDesc.value.scrollTop = vNew - window.innerHeight * 1
|
|
|
- } else if (vNew < vOld && vNew <= window.innerHeight * 1) {
|
|
|
+ if (vNew > paintingMoveUpFinishAt) {
|
|
|
+ longDesc.value.scrollTop = vNew - paintingMoveUpFinishAt
|
|
|
+ } else if (vNew < vOld && vNew <= paintingMoveUpFinishAt) {
|
|
|
longDesc.value.scrollTop = 0
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+const stemShowAt = longDescHideFinishAt + window.innerHeight * 0.1
|
|
|
+const stemShowFinishAt = stemShowAt + window.innerHeight * 0.5
|
|
|
+const stemHideAt = stemShowFinishAt + window.innerHeight * 0.5
|
|
|
+const stemHideFisishAt = stemShowFinishAt + window.innerHeight * 0.5
|
|
|
const stemOpacity = computed(() => {
|
|
|
let ret = null
|
|
|
- if (scrollerElScrollTop.value <= window.innerHeight * 3) {
|
|
|
+ if (scrollerElScrollTop.value <= stemShowAt) {
|
|
|
ret = 0
|
|
|
- } else if (scrollerElScrollTop.value > window.innerHeight * 3 && scrollerElScrollTop.value < window.innerHeight * 3.5) {
|
|
|
- ret = (scrollerElScrollTop.value - window.innerHeight * 3) / (window.innerHeight * (3.5 - 3))
|
|
|
- } else if (scrollerElScrollTop.value >= window.innerHeight * 3.5 && scrollerElScrollTop.value <= window.innerHeight * 4) {
|
|
|
+ } else if (scrollerElScrollTop.value > stemShowAt && scrollerElScrollTop.value < stemShowFinishAt) {
|
|
|
+ ret = (scrollerElScrollTop.value - stemShowAt) / (stemShowFinishAt - stemShowAt)
|
|
|
+ } else if (scrollerElScrollTop.value >= stemShowFinishAt && scrollerElScrollTop.value <= stemHideAt) {
|
|
|
ret = 1
|
|
|
- } else if (scrollerElScrollTop.value > window.innerHeight * 4 && scrollerElScrollTop.value < window.innerHeight * 4.5) {
|
|
|
- ret = 1 - (scrollerElScrollTop.value - window.innerHeight * 4) / (window.innerHeight * (4.5 - 4))
|
|
|
+ } else if (scrollerElScrollTop.value > stemHideAt && scrollerElScrollTop.value < stemHideFisishAt) {
|
|
|
+ ret = 1 - (scrollerElScrollTop.value - stemHideAt) / (stemHideFisishAt - stemHideAt)
|
|
|
} else {
|
|
|
ret = 0
|
|
|
}
|
|
|
return ret
|
|
|
})
|
|
|
|
|
|
+const leafShowAt = stemHideFisishAt + (0.1 * window.innerHeight)
|
|
|
+const leafShowFinishAt = leafShowAt + (0.5 * window.innerHeight)
|
|
|
+const leafHideAt = leafShowFinishAt + (0.5 * window.innerHeight)
|
|
|
+const leafHideFisishAt = leafHideAt + (0.5 * window.innerHeight)
|
|
|
const leafOpacity = computed(() => {
|
|
|
let ret = null
|
|
|
- if (scrollerElScrollTop.value <= window.innerHeight * 5) {
|
|
|
+ if (scrollerElScrollTop.value <= leafShowAt) {
|
|
|
ret = 0
|
|
|
- } else if (scrollerElScrollTop.value > window.innerHeight * 5 && scrollerElScrollTop.value < window.innerHeight * 5.5) {
|
|
|
- ret = (scrollerElScrollTop.value - window.innerHeight * 5) / (window.innerHeight * (5.5 - 5))
|
|
|
- } else if (scrollerElScrollTop.value >= window.innerHeight * 5.5 && scrollerElScrollTop.value <= window.innerHeight * 6) {
|
|
|
+ } else if (scrollerElScrollTop.value > leafShowAt && scrollerElScrollTop.value < leafShowFinishAt) {
|
|
|
+ ret = (scrollerElScrollTop.value - leafShowAt) / (leafShowFinishAt - leafShowAt)
|
|
|
+ } else if (scrollerElScrollTop.value >= leafShowFinishAt && scrollerElScrollTop.value <= leafHideAt) {
|
|
|
ret = 1
|
|
|
- } else if (scrollerElScrollTop.value > window.innerHeight * 6 && scrollerElScrollTop.value < window.innerHeight * 6.5) {
|
|
|
- ret = 1 - (scrollerElScrollTop.value - window.innerHeight * 6) / (window.innerHeight * (6.5 - 6))
|
|
|
+ } else if (scrollerElScrollTop.value > leafHideAt && scrollerElScrollTop.value < leafHideFisishAt) {
|
|
|
+ ret = 1 - (scrollerElScrollTop.value - leafHideAt) / (leafHideFisishAt - leafHideAt)
|
|
|
} else {
|
|
|
ret = 0
|
|
|
}
|
|
|
return ret
|
|
|
})
|
|
|
|
|
|
+const stoneShowAt = leafHideFisishAt + (0.1 * window.innerHeight)
|
|
|
+const stoneShowFinishAt = stoneShowAt + (0.5 * window.innerHeight)
|
|
|
+const stoneHideAt = stoneShowFinishAt + (0.5 * window.innerHeight)
|
|
|
+const stoneHideFinishAt = stoneHideAt + (0.5 * window.innerHeight)
|
|
|
const stoneOpacity = computed(() => {
|
|
|
let ret = null
|
|
|
- if (scrollerElScrollTop.value <= window.innerHeight * 7) {
|
|
|
+ if (scrollerElScrollTop.value <= stoneShowAt) {
|
|
|
ret = 0
|
|
|
- } else if (scrollerElScrollTop.value > window.innerHeight * 7 && scrollerElScrollTop.value < window.innerHeight * 7.5) {
|
|
|
- ret = (scrollerElScrollTop.value - window.innerHeight * 7) / (window.innerHeight * (7.5 - 7))
|
|
|
- } else if (scrollerElScrollTop.value >= window.innerHeight * 7.5 && scrollerElScrollTop.value <= window.innerHeight * 8) {
|
|
|
+ } else if (scrollerElScrollTop.value > stoneShowAt && scrollerElScrollTop.value < stoneShowFinishAt) {
|
|
|
+ ret = (scrollerElScrollTop.value - stoneShowAt) / (stoneShowFinishAt - stoneShowAt)
|
|
|
+ } else if (scrollerElScrollTop.value >= stoneShowFinishAt && scrollerElScrollTop.value <= stoneHideAt) {
|
|
|
ret = 1
|
|
|
- } else if (scrollerElScrollTop.value > window.innerHeight * 8 && scrollerElScrollTop.value < window.innerHeight * 8.5) {
|
|
|
- ret = 1 - (scrollerElScrollTop.value - window.innerHeight * 8) / (window.innerHeight * (8.5 - 8))
|
|
|
+ } else if (scrollerElScrollTop.value > stoneHideAt && scrollerElScrollTop.value < stoneHideFinishAt) {
|
|
|
+ ret = 1 - (scrollerElScrollTop.value - stoneHideAt) / (stoneHideFinishAt - stoneHideAt)
|
|
|
} else {
|
|
|
ret = 0
|
|
|
}
|
|
|
return ret
|
|
|
})
|
|
|
|
|
|
+const summaryShowAt = stoneHideFinishAt + window.innerHeight * 0.3
|
|
|
+const summaryShowFinishAt = summaryShowAt + window.innerHeight * 0.5
|
|
|
+const summaryHideAt = summaryShowFinishAt + window.innerHeight * 0.5
|
|
|
+const summaryHideFisishAt = summaryHideAt + window.innerHeight * 0.5
|
|
|
const summaryOpacity = computed(() => {
|
|
|
let ret = null
|
|
|
- if (scrollerElScrollTop.value <= window.innerHeight * 9) {
|
|
|
+ if (scrollerElScrollTop.value <= summaryShowAt) {
|
|
|
ret = 0
|
|
|
- } else if (scrollerElScrollTop.value > window.innerHeight * 9 && scrollerElScrollTop.value < window.innerHeight * 9.5) {
|
|
|
- ret = (scrollerElScrollTop.value - window.innerHeight * 9) / (window.innerHeight * (9.5 - 9))
|
|
|
- } else if (scrollerElScrollTop.value >= window.innerHeight * 9.5 && scrollerElScrollTop.value <= window.innerHeight * 10) {
|
|
|
+ } else if (scrollerElScrollTop.value > summaryShowAt && scrollerElScrollTop.value < summaryShowFinishAt) {
|
|
|
+ ret = (scrollerElScrollTop.value - summaryShowAt) / (summaryShowFinishAt - summaryShowAt)
|
|
|
+ } else if (scrollerElScrollTop.value >= summaryShowFinishAt && scrollerElScrollTop.value <= summaryHideAt) {
|
|
|
ret = 1
|
|
|
- } else if (scrollerElScrollTop.value > window.innerHeight * 10 && scrollerElScrollTop.value < window.innerHeight * 10.5) {
|
|
|
- ret = 1 - (scrollerElScrollTop.value - window.innerHeight * 10) / (window.innerHeight * (10.5 - 10))
|
|
|
+ } else if (scrollerElScrollTop.value > summaryHideAt && scrollerElScrollTop.value < summaryHideFisishAt) {
|
|
|
+ ret = 1 - (scrollerElScrollTop.value - summaryHideAt) / (summaryHideFisishAt - summaryHideAt)
|
|
|
} else {
|
|
|
ret = 0
|
|
|
}
|
|
|
return ret
|
|
|
})
|
|
|
|
|
|
+const sizeShowAt = stemShowAt
|
|
|
+const sizeShowFinishAt = stemShowFinishAt
|
|
|
+const sizeHideAt = stoneHideAt
|
|
|
+const sizeHideFisishAt = stoneHideFinishAt
|
|
|
const sizeOpacity = computed(() => {
|
|
|
let ret = null
|
|
|
- if (scrollerElScrollTop.value <= window.innerHeight * 3) {
|
|
|
+ if (scrollerElScrollTop.value <= sizeShowAt) {
|
|
|
ret = 0
|
|
|
- } else if (scrollerElScrollTop.value > window.innerHeight * 3 && scrollerElScrollTop.value < window.innerHeight * 3.5) {
|
|
|
- ret = (scrollerElScrollTop.value - window.innerHeight * 3) / (window.innerHeight * (3.5 - 3))
|
|
|
- } else if (scrollerElScrollTop.value >= window.innerHeight * 3.5 && scrollerElScrollTop.value <= window.innerHeight * 8) {
|
|
|
+ } else if (scrollerElScrollTop.value > sizeShowAt && scrollerElScrollTop.value < sizeShowFinishAt) {
|
|
|
+ ret = (scrollerElScrollTop.value - sizeShowAt) / (sizeShowFinishAt - sizeShowAt)
|
|
|
+ } else if (scrollerElScrollTop.value >= sizeShowFinishAt && scrollerElScrollTop.value <= sizeHideAt) {
|
|
|
ret = 1
|
|
|
- } else if (scrollerElScrollTop.value > window.innerHeight * 8 && scrollerElScrollTop.value < window.innerHeight * 8.5) {
|
|
|
- ret = 1 - (scrollerElScrollTop.value - window.innerHeight * 8) / (window.innerHeight * (8.5 - 8))
|
|
|
+ } else if (scrollerElScrollTop.value > sizeHideAt && scrollerElScrollTop.value < sizeHideFisishAt) {
|
|
|
+ ret = 1 - (scrollerElScrollTop.value - sizeHideAt) / (sizeHideFisishAt - sizeHideAt)
|
|
|
} else {
|
|
|
ret = 0
|
|
|
}
|
|
@@ -453,7 +572,7 @@ const sizeOpacity = computed(() => {
|
|
|
|
|
|
const isShowHotspot = computed(() => {
|
|
|
let ret = null
|
|
|
- if (scrollerElScrollTop.value <= window.innerHeight * 3) {
|
|
|
+ if (scrollerElScrollTop.value <= sizeShowAt) {
|
|
|
ret = false
|
|
|
} else {
|
|
|
return true
|
|
@@ -472,35 +591,52 @@ function showBigPainting() {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 上滑跳转新页面
|
|
|
+ * 跳转新页面
|
|
|
*/
|
|
|
const videoFadeToNextPageEl = ref(null)
|
|
|
const isShowVideoFadeToNextPage = ref(false)
|
|
|
const isShowSkip = ref(false)
|
|
|
-const fingerPosYWhenTouchStart = ref(0)
|
|
|
-const isAtBottomWhenTouchStart = ref(false)
|
|
|
-const handletouchstart = (event) => {
|
|
|
- fingerPosYWhenTouchStart.value = event.changedTouches[0].pageY
|
|
|
- if (Math.abs(scrollerEl.value.scrollTop + scrollerEl.value.clientHeight - scrollerEl.value.scrollHeight) <= 1) {
|
|
|
- isAtBottomWhenTouchStart.value = true
|
|
|
+// const fingerPosYWhenTouchStart = ref(0)
|
|
|
+// const isAtBottomWhenTouchStart = ref(false)
|
|
|
+// const handletouchstart = (event) => {
|
|
|
+// fingerPosYWhenTouchStart.value = event.changedTouches[0].pageY
|
|
|
+// if (Math.abs(scrollerEl.value.scrollTop + scrollerEl.value.clientHeight - scrollerEl.value.scrollHeight) <= 1) {
|
|
|
+// isAtBottomWhenTouchStart.value = true
|
|
|
+// } else {
|
|
|
+// isAtBottomWhenTouchStart.value = false
|
|
|
+// }
|
|
|
+// }
|
|
|
+// const touchMove = (event) => {
|
|
|
+// let currentY = event.changedTouches[0].pageY
|
|
|
+// let tY = currentY - fingerPosYWhenTouchStart.value
|
|
|
+// if (tY < -1 && isAtBottomWhenTouchStart.value) {
|
|
|
+// isShowVideoFadeToNextPage.value = true
|
|
|
+// nextTick(() => {
|
|
|
+// videoFadeToNextPageEl.value.play()
|
|
|
+// })
|
|
|
+// setTimeout(() => {
|
|
|
+// isShowSkip.value = true
|
|
|
+// }, 2000)
|
|
|
+// }
|
|
|
+// }
|
|
|
+const isShowBtnGoNextPage = ref(false)
|
|
|
+watch(scrollerElScrollTop, (v) => {
|
|
|
+ if (Math.abs(v + windowHeight.value - scrollerEl.value.scrollHeight) < 3) {
|
|
|
+ isShowBtnGoNextPage.value = true
|
|
|
} else {
|
|
|
- isAtBottomWhenTouchStart.value = false
|
|
|
- }
|
|
|
-}
|
|
|
-const touchMove = (event) => {
|
|
|
- let currentY = event.changedTouches[0].pageY
|
|
|
- let tY = currentY - fingerPosYWhenTouchStart.value
|
|
|
- if (tY < -1 && isAtBottomWhenTouchStart.value) {
|
|
|
- isShowVideoFadeToNextPage.value = true
|
|
|
- nextTick(() => {
|
|
|
- videoFadeToNextPageEl.value.play()
|
|
|
- })
|
|
|
- setTimeout(() => {
|
|
|
- isShowSkip.value = true
|
|
|
- }, 2000)
|
|
|
+ isShowBtnGoNextPage.value = false
|
|
|
}
|
|
|
+})
|
|
|
+function onClickGoNextPage() {
|
|
|
+ isShowBtnGoNextPage.value = false
|
|
|
+ isShowVideoFadeToNextPage.value = true
|
|
|
+ nextTick(() => {
|
|
|
+ videoFadeToNextPageEl.value.play()
|
|
|
+ })
|
|
|
+ setTimeout(() => {
|
|
|
+ isShowSkip.value = true
|
|
|
+ }, 2000)
|
|
|
}
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
@@ -528,7 +664,7 @@ const touchMove = (event) => {
|
|
|
>.title-wrap{
|
|
|
position: absolute;
|
|
|
left: 50%;
|
|
|
- top: calc(6 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ top: calc(36 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
transform: translate(-50%);
|
|
|
width: calc(43 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
height: calc(180 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
@@ -560,14 +696,12 @@ const touchMove = (event) => {
|
|
|
position: absolute;
|
|
|
left: 50%;
|
|
|
transform: translate(-50%, 0);
|
|
|
- width: calc(309 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
- height: calc(522 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
>.size-sign-h{
|
|
|
position: absolute;
|
|
|
left: 50%;
|
|
|
top: 0;
|
|
|
transform: translate(-50%, -105%);
|
|
|
- width: calc(309 * 0.9 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ width: calc(245 / 308 * 100%);
|
|
|
>img{
|
|
|
width: 100%;
|
|
|
}
|
|
@@ -578,7 +712,7 @@ const touchMove = (event) => {
|
|
|
transform: translate(-50%, -50%);
|
|
|
font-family: KaiTi, KaiTi;
|
|
|
font-weight: 400;
|
|
|
- font-size: calc(18 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ font-size: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
color: #FFFFFF;
|
|
|
line-height: calc(23 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
text-shadow: 0px 0px calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')) #F8DD86;
|
|
@@ -587,9 +721,9 @@ const touchMove = (event) => {
|
|
|
>.size-sign-v{
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
- top: 50%;
|
|
|
+ top: 54%;
|
|
|
transform: translate(80%, -50%);
|
|
|
- height: calc(464 * 0.9 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ height: calc(371 / 523 * 100%);
|
|
|
>img{
|
|
|
height: 100%;
|
|
|
}
|
|
@@ -600,7 +734,7 @@ const touchMove = (event) => {
|
|
|
transform: translate(-50%, -50%);
|
|
|
font-family: KaiTi, KaiTi;
|
|
|
font-weight: 400;
|
|
|
- font-size: calc(18 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ font-size: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
color: #FFFFFF;
|
|
|
line-height: calc(23 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
text-shadow: 0px 0px calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')) #F8DD86;
|
|
@@ -617,9 +751,9 @@ const touchMove = (event) => {
|
|
|
>img.painting, img.painting-stem, img.painting-leaf, img.painting-stone{
|
|
|
position: absolute;
|
|
|
left: 50%;
|
|
|
- top: calc(103 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
- transform: translate(-50%, 0);
|
|
|
- width: calc(245 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ top: 54%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ width: calc(245 / 308 * 100%);
|
|
|
}
|
|
|
}
|
|
|
>.hotspot-wrap{
|
|
@@ -691,6 +825,66 @@ const touchMove = (event) => {
|
|
|
line-height: calc(25 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
text-align: justify;
|
|
|
}
|
|
|
+ >.progress-bar{
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 15px;
|
|
|
+ >.bar-artwork-desc{
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ right: 10px;
|
|
|
+ height: 3px;
|
|
|
+ background-color: #A9D185;
|
|
|
+ }
|
|
|
+ >img.progress-bar-node-1{
|
|
|
+ position: absolute;
|
|
|
+ left: calc(0.6 * v-bind('longDescHideFinishAt') / v-bind('summaryHideAt') * 100%);
|
|
|
+ bottom: 1px;
|
|
|
+ width: 2.41px;
|
|
|
+ height: 10.23px
|
|
|
+ }
|
|
|
+ >.bar-author-desc{
|
|
|
+ position: absolute;
|
|
|
+ left: 12px;
|
|
|
+ bottom: 0;
|
|
|
+ right: calc(v-bind('longDescHideFinishAt') / v-bind('summaryHideAt') * 100%);
|
|
|
+ height: 3px;
|
|
|
+ background: #A9D185;
|
|
|
+ }
|
|
|
+ >img.progress-bar-node-2{
|
|
|
+ position: absolute;
|
|
|
+ left: calc(v-bind('longDescHideFinishAt') / v-bind('summaryHideAt') * 100%);
|
|
|
+ bottom: 1px;
|
|
|
+ width: 7.5px;
|
|
|
+ height: 10.8px
|
|
|
+ }
|
|
|
+ >.bar-artwork-enjoy{
|
|
|
+ position: absolute;
|
|
|
+ left: calc(v-bind('stoneShowAt') / v-bind('summaryHideAt') * 100%);
|
|
|
+ bottom: 0;
|
|
|
+ right: 0;
|
|
|
+ height: 3px;
|
|
|
+ background: #A9D185;
|
|
|
+ }
|
|
|
+ >img.progress-bar-node-3{
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ bottom: 1px;
|
|
|
+ width: 9.7px;
|
|
|
+ height: 10.8px
|
|
|
+ }
|
|
|
+
|
|
|
+ > .mask{
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ height: 15px;
|
|
|
+ background-color: #6e8175;
|
|
|
+ }
|
|
|
+ }
|
|
|
>.operation-tip{
|
|
|
position: absolute;
|
|
|
left: 50%;
|
|
@@ -706,7 +900,6 @@ const touchMove = (event) => {
|
|
|
overflow: auto;
|
|
|
>.inner{
|
|
|
width: 100%;
|
|
|
- height: 1050%;
|
|
|
}
|
|
|
}
|
|
|
>.hotspot-detail{
|
|
@@ -715,7 +908,7 @@ const touchMove = (event) => {
|
|
|
>.hotspot-detail.painting-detail{
|
|
|
backdrop-filter: blur(calc(20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')));
|
|
|
}
|
|
|
- >.fade-to-next-page{
|
|
|
+ >video.fade-to-next-page{
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
top: 0;
|
|
@@ -724,5 +917,13 @@ const touchMove = (event) => {
|
|
|
object-fit: cover;
|
|
|
z-index: 20;
|
|
|
}
|
|
|
+
|
|
|
+ >button.go-next-page{
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ bottom: calc(25 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ z-index: 20;
|
|
|
+ transform: translate(-50%, 0);
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|