|
@@ -11,7 +11,7 @@
|
|
|
:style="{
|
|
|
left: bgLeft + 'px',
|
|
|
}"
|
|
|
- src="@/assets/images/fade-chapter-wood/bg-min.jpg"
|
|
|
+ src="@/assets/images/more-content-wood/bg-min.jpg"
|
|
|
alt=""
|
|
|
draggable="false"
|
|
|
>
|
|
@@ -24,7 +24,7 @@
|
|
|
>
|
|
|
<img
|
|
|
class="bamboo"
|
|
|
- src="@/assets/images/fade-chapter-wood/4-min.png"
|
|
|
+ src="@/assets/images/more-content-wood/4-min.png"
|
|
|
alt=""
|
|
|
draggable="false"
|
|
|
>
|
|
@@ -38,7 +38,7 @@
|
|
|
>
|
|
|
<img
|
|
|
class="bamboo"
|
|
|
- src="@/assets/images/fade-chapter-wood/3-min.png"
|
|
|
+ src="@/assets/images/more-content-wood/3-min.png"
|
|
|
alt=""
|
|
|
draggable="false"
|
|
|
>
|
|
@@ -52,7 +52,7 @@
|
|
|
>
|
|
|
<img
|
|
|
class="bamboo"
|
|
|
- src="@/assets/images/fade-chapter-wood/2-min.png"
|
|
|
+ src="@/assets/images/more-content-wood/2-min.png"
|
|
|
alt=""
|
|
|
draggable="false"
|
|
|
>
|
|
@@ -66,7 +66,7 @@
|
|
|
>
|
|
|
<img
|
|
|
class="bamboo"
|
|
|
- src="@/assets/images/fade-chapter-wood/1-min.png"
|
|
|
+ src="@/assets/images/more-content-wood/1-min.png"
|
|
|
alt=""
|
|
|
draggable="false"
|
|
|
>
|
|
@@ -102,7 +102,7 @@
|
|
|
<div class="button-group animation-show-long-hide">
|
|
|
<img
|
|
|
class="splitter"
|
|
|
- src="@/assets/images/fade-chapter-wood/btn-splitter.png"
|
|
|
+ src="@/assets/images/more-content-wood/btn-splitter.png"
|
|
|
alt=""
|
|
|
draggable="false"
|
|
|
>
|
|
@@ -114,7 +114,7 @@
|
|
|
</button>
|
|
|
<img
|
|
|
class="splitter"
|
|
|
- src="@/assets/images/fade-chapter-wood/btn-splitter.png"
|
|
|
+ src="@/assets/images/more-content-wood/btn-splitter.png"
|
|
|
alt=""
|
|
|
draggable="false"
|
|
|
>
|
|
@@ -126,7 +126,7 @@
|
|
|
</button>
|
|
|
<img
|
|
|
class="splitter"
|
|
|
- src="@/assets/images/fade-chapter-wood/btn-splitter.png"
|
|
|
+ src="@/assets/images/more-content-wood/btn-splitter.png"
|
|
|
alt=""
|
|
|
draggable="false"
|
|
|
>
|
|
@@ -138,7 +138,7 @@
|
|
|
</button>
|
|
|
<img
|
|
|
class="splitter"
|
|
|
- src="@/assets/images/fade-chapter-wood/btn-splitter.png"
|
|
|
+ src="@/assets/images/more-content-wood/btn-splitter.png"
|
|
|
alt=""
|
|
|
draggable="false"
|
|
|
>
|
|
@@ -193,10 +193,7 @@
|
|
|
</div>
|
|
|
<div
|
|
|
class="restart"
|
|
|
- @click="() => {
|
|
|
- store.state.haveShownStartup = false;
|
|
|
- router.replace('/?back=1');
|
|
|
- }"
|
|
|
+ @click="onClickRestart"
|
|
|
>
|
|
|
重新开始
|
|
|
</div>
|
|
@@ -236,15 +233,16 @@
|
|
|
<BtnBack @click="router.go('-1')" />
|
|
|
|
|
|
<OperationTip
|
|
|
+ v-show="isShowOperationTip"
|
|
|
class="operation-tip"
|
|
|
- :text="'左右滑动'"
|
|
|
+ :text="'向下滑动滚轮'"
|
|
|
:color="'green'"
|
|
|
/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, computed, watch, onBeforeMount, nextTick } from "vue"
|
|
|
+import { ref, computed, watch, onBeforeMount, nextTick, onBeforeUnmount } from "vue"
|
|
|
import { useRoute, useRouter } from "vue-router"
|
|
|
import { useStore } from "vuex"
|
|
|
import useSmoothSwipe from "@/useFunctions/useSmoothSwipe.js"
|
|
@@ -262,15 +260,17 @@ const scrollTarget = ref(null)
|
|
|
const { width: windowWidth, height: windowHeight } = useWindowSize()
|
|
|
|
|
|
const maxTranslateLength = computed(() => {
|
|
|
- return (windowHeight.value * windowWidthDesign) / windowHeightDesign - 110 // 有的图层不够长导致移动到最右侧不好看,隐藏掉。
|
|
|
+ return windowHeight.value * windowWidthDesign / windowHeightDesign - 200 * windowHeight.value / windowHeightDesign // 有的图层不够长导致移动到最右侧不好看,隐藏掉。
|
|
|
})
|
|
|
|
|
|
const {
|
|
|
translateLength,
|
|
|
+ haveSwipedThisTime, // 用于在click事件中判断是否是鼠标按下后左右滑动导致的
|
|
|
} = useSmoothSwipe({
|
|
|
scrollTargetRef: scrollTarget,
|
|
|
maxTranslateLength,
|
|
|
viewportWidth: windowWidth,
|
|
|
+ initialTranslateLength: store.state.scrollPosInMoreContentPage
|
|
|
})
|
|
|
|
|
|
// 背景位移
|
|
@@ -312,12 +312,18 @@ watch(
|
|
|
)
|
|
|
|
|
|
function onClickShuangGouEntry() {
|
|
|
+ if (haveSwipedThisTime.value) {
|
|
|
+ return
|
|
|
+ }
|
|
|
router.push({
|
|
|
name: 'ShuangGou',
|
|
|
})
|
|
|
}
|
|
|
|
|
|
function onClickEntryAtMoZhu(pathName) {
|
|
|
+ if (haveSwipedThisTime.value) {
|
|
|
+ return
|
|
|
+ }
|
|
|
router.push({
|
|
|
name: pathName,
|
|
|
})
|
|
@@ -325,13 +331,34 @@ function onClickEntryAtMoZhu(pathName) {
|
|
|
|
|
|
// 点击线上展厅
|
|
|
const OpenScene = () => {
|
|
|
+ if (haveSwipedThisTime.value) {
|
|
|
+ return
|
|
|
+ }
|
|
|
const musicDom = document.getElementById("bg-music")
|
|
|
musicDom.pause()
|
|
|
router.push('/scene')
|
|
|
}
|
|
|
|
|
|
+function onClickRestart() {
|
|
|
+ if (haveSwipedThisTime.value) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ window.location.href = window.location.pathname
|
|
|
+}
|
|
|
+
|
|
|
const isShowCast = ref(false)
|
|
|
|
|
|
+const isShowOperationTip = ref(true)
|
|
|
+const unwatch = watch(translateLength, (v) => {
|
|
|
+ if (v) {
|
|
|
+ isShowOperationTip.value = false
|
|
|
+ unwatch()
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+onBeforeUnmount(() => {
|
|
|
+ store.commit('setScrollPosInMoreContentPage', translateLength.value)
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
@@ -422,7 +449,7 @@ const isShowCast = ref(false)
|
|
|
);
|
|
|
color: #474747;
|
|
|
left: 0;
|
|
|
- background-image: url(@/assets/images/fade-chapter-wood/btn-bg-big.png);
|
|
|
+ background-image: url(@/assets/images/more-content-wood/btn-bg-big.png);
|
|
|
background-size: contain;
|
|
|
background-repeat: no-repeat;
|
|
|
background-position: center center;
|
|
@@ -493,7 +520,7 @@ const isShowCast = ref(false)
|
|
|
> div {
|
|
|
.button-common-style();
|
|
|
color: #474747;
|
|
|
- background-image: url(@/assets/images/fade-chapter-wood/btn-bg-big.png);
|
|
|
+ background-image: url(@/assets/images/more-content-wood/btn-bg-big.png);
|
|
|
background-size: contain;
|
|
|
background-repeat: no-repeat;
|
|
|
background-position: center center;
|
|
@@ -607,14 +634,8 @@ const isShowCast = ref(false)
|
|
|
|
|
|
> .operation-tip {
|
|
|
position: absolute;
|
|
|
- right: calc(
|
|
|
- 44 / v-bind("windowSizeWhenDesignForRef") *
|
|
|
- v-bind("windowSizeInCssForRef")
|
|
|
- );
|
|
|
- bottom: calc(
|
|
|
- 74 / v-bind("windowSizeWhenDesignForRef") *
|
|
|
- v-bind("windowSizeInCssForRef")
|
|
|
- );
|
|
|
+ bottom: calc(234px * v-bind("windowHeight") / v-bind("windowHeightDesign"));
|
|
|
+ right: calc(507px * v-bind("windowHeight") / v-bind("windowHeightDesign"));
|
|
|
}
|
|
|
}
|
|
|
</style>
|