|
@@ -15,11 +15,18 @@ import AuthorImg from '@/assets/images/icon_home_author-min.png'
|
|
|
import AuthorImgAc from '@/assets/images/icon_home_author-min-ac.png'
|
|
|
|
|
|
import useSizeAdapt from "@/useFunctions/useSizeAdapt"
|
|
|
+import { useWindowSize } from "@vueuse/core"
|
|
|
+
|
|
|
|
|
|
const store = useStore()
|
|
|
const router = useRouter()
|
|
|
const route = useRoute()
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+const windowHeightDesign = 1080 - 71 - 37 // 设计稿里视口高度。注意要减去上下边栏
|
|
|
+const { width: windowWidth, height: windowHeight } = useWindowSize()
|
|
|
+
|
|
|
const { handleScrollThrottle } = useRollFu()
|
|
|
|
|
|
const isShowOperationTip = ref(true)
|
|
@@ -75,6 +82,17 @@ watch(curPageIndex, (val) => {
|
|
|
// return curPageIndex.value == 0 || curPageIndex.value == 4
|
|
|
// }, 1500))
|
|
|
|
|
|
+// 知识探索
|
|
|
+const goMorePart = () => {
|
|
|
+ // 播放视频
|
|
|
+ isShowVideoFadeToNextPage.value = true
|
|
|
+ nextTick(() => {
|
|
|
+ videoFadeToNextPageEl.value.play()
|
|
|
+ })
|
|
|
+ setTimeout(() => {
|
|
|
+ isShowSkip.value = true
|
|
|
+ }, 2000)
|
|
|
+}
|
|
|
// 滑动逻辑
|
|
|
const scrollFu = (event, val) => {
|
|
|
console.log('在滚动', val)
|
|
@@ -89,14 +107,7 @@ const scrollFu = (event, val) => {
|
|
|
if (curPageIndex.value < 4) {
|
|
|
curPageIndex.value = curPageIndex.value + 1
|
|
|
} else if (curPageIndex.value == 4) {
|
|
|
- // 播放视频
|
|
|
- isShowVideoFadeToNextPage.value = true
|
|
|
- nextTick(() => {
|
|
|
- videoFadeToNextPageEl.value.play()
|
|
|
- })
|
|
|
- setTimeout(() => {
|
|
|
- isShowSkip.value = true
|
|
|
- }, 2000)
|
|
|
+ goMorePart()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -223,6 +234,13 @@ onMounted(() => {
|
|
|
>
|
|
|
<div>作者简介</div>
|
|
|
</div>
|
|
|
+ <img
|
|
|
+ v-show="curPageIndex == 0 "
|
|
|
+ class="more-part-btn"
|
|
|
+ src="@/assets/images/home-long-desc-bg.png"
|
|
|
+ alt=""
|
|
|
+ @click="goMorePart"
|
|
|
+ >
|
|
|
</div>
|
|
|
|
|
|
<!-- 画作 -->
|
|
@@ -408,7 +426,7 @@ onMounted(() => {
|
|
|
right: 25%;
|
|
|
top: 50%;
|
|
|
transform: translateY(-50%);
|
|
|
- width: 100px;
|
|
|
+ // width: 100px;
|
|
|
height: 45%;
|
|
|
z-index: 5;
|
|
|
transition: opacity 1.5s ease;
|
|
@@ -417,7 +435,8 @@ onMounted(() => {
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
top: 0;
|
|
|
- width: 100%;
|
|
|
+ // width: 100%;
|
|
|
+ transform: translateX(-100%);
|
|
|
height: 100%;
|
|
|
}
|
|
|
|
|
@@ -429,9 +448,11 @@ onMounted(() => {
|
|
|
writing-mode: vertical-lr;
|
|
|
font-family: KaiTi;
|
|
|
font-weight: 400;
|
|
|
- font-size: 20px;
|
|
|
+ // font-size: 20px;
|
|
|
+ font-size: calc(20px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
color: #ffffff;
|
|
|
- line-height: 30px;
|
|
|
+ // line-height: 30px;
|
|
|
+ line-height: calc(30px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
white-space: pre;
|
|
|
letter-spacing: 0.2em;
|
|
|
text-align: center;
|
|
@@ -439,8 +460,8 @@ onMounted(() => {
|
|
|
}
|
|
|
> .long-desc {
|
|
|
position: absolute;
|
|
|
- bottom: 30px;
|
|
|
- right: 30px;
|
|
|
+ bottom: calc(30px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
+ right: calc(30px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
color: white;
|
|
|
overflow: hidden;
|
|
|
font-family: KaiTi;
|
|
@@ -449,8 +470,14 @@ onMounted(() => {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
z-index: 10;
|
|
|
transition: opacity 1.5s ease;
|
|
|
+ >.more-part-btn{
|
|
|
+ width: calc(67px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
+ margin-top: calc(10px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
|
|
|
> .page2-box {
|
|
|
display: flex;
|
|
@@ -465,10 +492,7 @@ onMounted(() => {
|
|
|
}
|
|
|
|
|
|
> div {
|
|
|
- font-size: calc(
|
|
|
- 20 / v-bind("windowSizeWhenDesignForRef") *
|
|
|
- v-bind("windowSizeInCssForRef")
|
|
|
- );
|
|
|
+ font-size: calc(20px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
font-family: KaiTi;
|
|
|
}
|
|
|
}
|
|
@@ -585,19 +609,20 @@ onMounted(() => {
|
|
|
transform: translateY(-50%);
|
|
|
left: 10%;
|
|
|
color: #ffffff;
|
|
|
- font-size: 25px;
|
|
|
- line-height: 38px;
|
|
|
+ font-size: calc(25px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
+ line-height: calc(38px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
font-family: "KaiTi";
|
|
|
transition: opacity 1.5s ease;
|
|
|
z-index: 10;
|
|
|
transition: left 1.5s ease;
|
|
|
.text-box-title {
|
|
|
- font-size: 42px;
|
|
|
- line-height: 48px;
|
|
|
- margin-bottom: 30px;
|
|
|
+ font-size: calc(42px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
+ line-height: calc(48px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
+ margin-bottom: calc(30px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
}
|
|
|
.text-box-desc{
|
|
|
text-indent: 2em;
|
|
|
+ max-width: calc(550px / v-bind('windowHeightDesign') * v-bind('windowHeight'));
|
|
|
}
|
|
|
}
|
|
|
}
|