|
@@ -23,12 +23,27 @@ const goScenefu = () => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+const isDetailBoxOpen = ref(false)
|
|
|
+const openDetailBox = () => {
|
|
|
+ isDetailBoxOpen.value = true
|
|
|
+}
|
|
|
+
|
|
|
+const isMobile = ref(false)
|
|
|
+
|
|
|
+const isMobileDevice = () => {
|
|
|
+ const mobileRegex = /Mobi|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;
|
|
|
+ return mobileRegex.test(navigator.userAgent);
|
|
|
+}
|
|
|
+
|
|
|
const onSelectfu = (item: any) => {
|
|
|
mode.value = store.dataAll.modeList[1]
|
|
|
curInfoPart.value = item
|
|
|
item.name === '救生艇' ? goScenefu() : ''
|
|
|
}
|
|
|
|
|
|
+// const time = ref();
|
|
|
+
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
if (Object.keys(store.mode).length != 0) {
|
|
|
mode.value = store.mode
|
|
@@ -36,6 +51,19 @@ onMounted(() => {
|
|
|
if (Object.keys(store.currentInfoPart).length != 0) {
|
|
|
curInfoPart.value = store.currentInfoPart
|
|
|
}
|
|
|
+
|
|
|
+ isMobile.value = isMobileDevice()
|
|
|
+ // @ts-ignore
|
|
|
+ // time.current = window.setTimeout(() => {
|
|
|
+ // // 根元素
|
|
|
+ // const dom: HTMLDivElement | null = document.querySelector("#app");
|
|
|
+ // if (dom && document.documentElement.clientWidth < 1000) {
|
|
|
+ // dom.style.height = document.documentElement.clientHeight + "px";
|
|
|
+ // dom.style.width = document.documentElement.clientWidth + "px";
|
|
|
+
|
|
|
+ // }
|
|
|
+ // }, 100);
|
|
|
+
|
|
|
})
|
|
|
|
|
|
</script>
|
|
@@ -43,6 +71,7 @@ onMounted(() => {
|
|
|
<template>
|
|
|
<div class='detail'>
|
|
|
<img class="logo-icon" src="@/assets/images/logoS.png" alt="">
|
|
|
+ <!-- pc端按钮 -->
|
|
|
<div class="menu-box">
|
|
|
<img src="@/assets/images/menu.png" alt="">
|
|
|
<div class="title" v-for="item in store.dataAll.modeList" :key="item.name"
|
|
@@ -62,8 +91,34 @@ onMounted(() => {
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- 移动端按钮 -->
|
|
|
+ <div class="menu-box-mo">
|
|
|
+ <div class="menu-left" @click="() => { mode = store.dataAll.modeList[0], curInfoPart = {} as any }">
|
|
|
+ <div class="title" :class="{ 'active': mode.name == 'stereoscopic' }">
|
|
|
+ 立面体
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="menu-right">
|
|
|
+ <div class="title" :class="{ 'active': mode.name == 'plane' }"
|
|
|
+ @click="() => { mode = store.dataAll.modeList[1], curInfoPart = {} as any }">
|
|
|
+ 平面图
|
|
|
+ </div>
|
|
|
+ <div class="menu-right-content" v-show="mode.name == 'plane'">
|
|
|
+ <div class="content-box">
|
|
|
+ <div class="content-item" v-for="(item, index) in mode.content" :key="index" @click="onSelectfu(item)">
|
|
|
+ <div class="number" :class="{ 'active': item.name == curInfoPart.name }">{{
|
|
|
+ item.number.replace(':',
|
|
|
+ '') }}</div>
|
|
|
+ <div :class="{ 'active': item.name == curInfoPart.name }">{{ item.name }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="bottom-icon">
|
|
|
+ <img src="@/assets/images/down-icon.png" alt="">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="main">
|
|
|
-
|
|
|
<img class="img3d" v-show="Object.keys(curInfoPart).length == 0" :src="`${baseURl}/${mode.name}/${mode.mainBody}`"
|
|
|
alt="">
|
|
|
<div class="main-box" v-show="Object.keys(curInfoPart).length > 0"
|
|
@@ -89,22 +144,39 @@ onMounted(() => {
|
|
|
<!-- 指引 -->
|
|
|
<div class="guide" :style="{ top: curInfoPart.guideP.top, left: curInfoPart.guideP.left }"
|
|
|
v-if="Object.keys(curInfoPart).length > 0 && curInfoPart.name != '救生艇'">
|
|
|
- <img class="hot" :style="{ top: curInfoPart.hotP.top, left: curInfoPart.hotP.left }" @click="goScenefu()"
|
|
|
- src="@/assets/images/hot.png" alt="">
|
|
|
+ <img class="hot"
|
|
|
+ :style="{ top: isMobile ? curInfoPart.hotP.topMo : curInfoPart.hotP.top, left: isMobile ? curInfoPart.hotP.leftMo : curInfoPart.hotP.left }"
|
|
|
+ @click="isMobile ? openDetailBox() : goScenefu()" src="@/assets/images/hot.png" alt="">
|
|
|
<img class="line"
|
|
|
:style="{ width: curInfoPart.lineP.width, height: curInfoPart.lineP.height, left: curInfoPart.lineP.left }"
|
|
|
:src="`${baseURl}/${mode.name}/line${curInfoPart.id}.png`" alt="">
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 移动端介绍弹框 -->
|
|
|
+ <div class="detail-box" v-show="isDetailBoxOpen">
|
|
|
+ <img class="close-box" @click="isDetailBoxOpen = false" src="@/assets/images/close.png" alt="">
|
|
|
+ <div class="content-box">
|
|
|
+ <img @click="goScenefu()" :src="`${baseURl}/${mode.name}/pic${curInfoPart.id}.png`" alt="">
|
|
|
+ <div class="info-box">
|
|
|
+ <div class="title">{{ curInfoPart.number + curInfoPart.name }}</div>
|
|
|
+ <div class="disc">{{ curInfoPart.info }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="enter-btn" @click="goScenefu()">
|
|
|
+ 进入场景
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<style lang='less' scoped>
|
|
|
.detail {
|
|
|
- width: 100vw;
|
|
|
- height: 100vh;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
background: url(@/assets/images/bg.png);
|
|
|
background-size: 100% 100%;
|
|
|
+ overflow: hidden;
|
|
|
|
|
|
.logo-icon {
|
|
|
position: absolute;
|
|
@@ -113,6 +185,10 @@ onMounted(() => {
|
|
|
width: 22vw;
|
|
|
}
|
|
|
|
|
|
+ .menu-box-mo {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+
|
|
|
.menu-box {
|
|
|
position: fixed;
|
|
|
right: 2vw;
|
|
@@ -135,7 +211,7 @@ onMounted(() => {
|
|
|
}
|
|
|
|
|
|
.activeTitle {
|
|
|
- color: #FFEFDA !important;
|
|
|
+ color: #FFEFDA;
|
|
|
text-shadow: 0px 0px 10px rgba(255, 255, 255, 0.5);
|
|
|
|
|
|
div {
|
|
@@ -334,4 +410,243 @@ onMounted(() => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+@media screen and (max-width: 1000px) {
|
|
|
+
|
|
|
+ ::-webkit-scrollbar {
|
|
|
+ width: 2px !important;
|
|
|
+ /* 定义滚动条的宽度 */
|
|
|
+ }
|
|
|
+
|
|
|
+ ::-webkit-scrollbar-thumb {
|
|
|
+ background: rgb(255, 255, 255);
|
|
|
+ /* 滑块的背景颜色 */
|
|
|
+ border-radius: 0px;
|
|
|
+ /* 滑块的圆角 */
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ .detail {
|
|
|
+ background: url(@/assets/images/bgMo.png);
|
|
|
+ background-size: 100% 100%;
|
|
|
+
|
|
|
+ .logo-icon {
|
|
|
+ left: 3%;
|
|
|
+ top: 6%;
|
|
|
+ width: 24vw;
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-box {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-box-mo {
|
|
|
+ display: block;
|
|
|
+
|
|
|
+ .title {
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ padding-left: 20%;
|
|
|
+ color: #351301;
|
|
|
+ font-family: 'REEJI-DuoguanGB-free-Flash';
|
|
|
+ font-size: 1.1em;
|
|
|
+ position: absolute;
|
|
|
+ white-space: nowrap;
|
|
|
+ // left: 50%;
|
|
|
+ // transform: translateX(120%);
|
|
|
+ top: 30px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
+ .active {
|
|
|
+ color: #FFEFDA !important;
|
|
|
+ text-shadow: 0px 0px 10px rgba(255, 255, 255, 0.5);
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-left {
|
|
|
+ width: 125px;
|
|
|
+ height: 65px;
|
|
|
+ background: url(@/assets/images/menu-left-mo.png);
|
|
|
+ background-size: contain;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ right: 45vh;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ @media screen and (max-height: 400px) {
|
|
|
+ width: 17vw;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-right {
|
|
|
+ width: 125px;
|
|
|
+ height: 65px;
|
|
|
+ background: url(@/assets/images/menu-right-mo.png);
|
|
|
+ background-size: contain;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ right: 1vw;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .menu-right-content {
|
|
|
+ width: 90%;
|
|
|
+ max-height: 80vh;
|
|
|
+ // overflow: auto;
|
|
|
+ background: url(@/assets/images/menu-right-bg.png);
|
|
|
+ background-size: cover;
|
|
|
+ position: absolute;
|
|
|
+ top: 60px;
|
|
|
+ // left: px;
|
|
|
+ margin-left: 10px;
|
|
|
+ padding: 10px 5px 30px 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+
|
|
|
+ .content-box {
|
|
|
+ max-height: calc(80vh - 40px);
|
|
|
+ overflow: auto;
|
|
|
+
|
|
|
+ div {
|
|
|
+ text-align: center;
|
|
|
+ font-size: 0.9em;
|
|
|
+ color: #CECECE;
|
|
|
+ }
|
|
|
+
|
|
|
+ .content-item {
|
|
|
+ margin-bottom: 10px;
|
|
|
+
|
|
|
+ .active {
|
|
|
+ color: #FFFFFF !important;
|
|
|
+ // text-shadow: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .number {
|
|
|
+ font-size: 0.8em;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .active {
|
|
|
+ color: #FFFFFF;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .bottom-icon {
|
|
|
+ width: 100%;
|
|
|
+ height: 20px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 8px;
|
|
|
+
|
|
|
+ img {
|
|
|
+ width: 18px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .main {
|
|
|
+ .img3d {
|
|
|
+ width: 70%;
|
|
|
+ margin-left: -15%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .main-box {
|
|
|
+ top: 25px;
|
|
|
+ .info-box {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .guide {
|
|
|
+ .line {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .hot {
|
|
|
+ width: 80px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .detail-box {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ background: url(@/assets/images/detail-box-bg.png);
|
|
|
+ background-size: cover;
|
|
|
+ z-index: 2;
|
|
|
+
|
|
|
+ .close-box {
|
|
|
+ position: absolute;
|
|
|
+ top: 30px;
|
|
|
+ right: 30px;
|
|
|
+ width: 35px;
|
|
|
+ height: 35px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .content-box {
|
|
|
+ display: flex;
|
|
|
+ width: 80%;
|
|
|
+ height: 70%;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ img {
|
|
|
+ width: 45%;
|
|
|
+ height: 100%;
|
|
|
+ object-fit: contain;
|
|
|
+ }
|
|
|
+
|
|
|
+ .info-box {
|
|
|
+ margin-left: 20px;
|
|
|
+
|
|
|
+ .title {
|
|
|
+ color: #E8B478;
|
|
|
+ font-size: 1.2em;
|
|
|
+ font-weight: bold;
|
|
|
+ letter-spacing: 2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .disc {
|
|
|
+ color: #FFFFFF;
|
|
|
+ font-size: 1em;
|
|
|
+ margin-top: 10px
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .enter-btn {
|
|
|
+ // margin-top: 20px;
|
|
|
+ width: 20vw;
|
|
|
+ height: 40px;
|
|
|
+ background: url(@/assets/images/enter-btn.png);
|
|
|
+ background-size: 100% 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ color: #FFFFFF;
|
|
|
+ letter-spacing: 2px;
|
|
|
+ font-size: 1.1em;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
</style>
|