|
@@ -2,7 +2,7 @@
|
|
|
<div class="layer" v-if="showPanel">
|
|
|
<div class="layer-content animated" :class="animateActive ? 'fadeInUpBig' : 'fadeOutDownBig'">
|
|
|
<div class="layer-title">
|
|
|
- <span>xxxx</span>
|
|
|
+ <span>{{ title }}</span>
|
|
|
<i
|
|
|
@click.stop="handleClose"
|
|
|
class="iconfont ui-kankan-icon icon tip-h-center tip-v-bottom icon-close close-btn"
|
|
@@ -11,20 +11,20 @@
|
|
|
<div class="main">
|
|
|
<tabs>
|
|
|
<tab name="简介">
|
|
|
- <IntroText />
|
|
|
+ <IntroText :data="roomInfo" />
|
|
|
</tab>
|
|
|
<tab name="相册">
|
|
|
- <ImageGrid :data="MockImageList" @click-image="handleViewer" />
|
|
|
+ <ImageGrid :data="imageList" @click-image="handleViewer" />
|
|
|
</tab>
|
|
|
- <tab name="地图">
|
|
|
+ <!-- <tab name="地图">
|
|
|
<Map />
|
|
|
- </tab>
|
|
|
+ </tab> -->
|
|
|
</tabs>
|
|
|
</div>
|
|
|
</div>
|
|
|
<ImageViewer
|
|
|
:current="currentImage"
|
|
|
- :data="MockImageList"
|
|
|
+ :data="imageList"
|
|
|
v-if="showViewer"
|
|
|
@close="showViewer = false"
|
|
|
/>
|
|
@@ -34,78 +34,52 @@
|
|
|
<script setup lang="ts">
|
|
|
import { Tabs, Tab } from 'vue3-tabs-component';
|
|
|
import { useAppStore } from '/@/store/modules/app';
|
|
|
- import { computed, ref, watchEffect } from 'vue';
|
|
|
+ import { computed, ref, watchEffect, unref, onMounted } from 'vue';
|
|
|
import ImageGrid from './image-grid.vue';
|
|
|
import IntroText from './intro-text.vue';
|
|
|
import ImageViewer from './image-view.vue';
|
|
|
import Map from './map.vue';
|
|
|
+ import { useSceneStore } from '/@/store/modules/scene';
|
|
|
+ import { useRoom } from '/@/hooks/useRoom';
|
|
|
|
|
|
- import {} from 'vue';
|
|
|
- import { unref } from 'vue';
|
|
|
- import { onMounted } from 'vue';
|
|
|
const appStore = useAppStore();
|
|
|
+ const sceneStore = useSceneStore();
|
|
|
(window as any).appStore = appStore;
|
|
|
const showPanel = computed(() => appStore.isShowIntroPanel);
|
|
|
+ const { room } = useRoom();
|
|
|
+
|
|
|
+ const title = computed(() => sceneStore.metadata.title);
|
|
|
const animateActive = ref(false);
|
|
|
const showViewer = ref(false);
|
|
|
const currentImage = ref(0);
|
|
|
+ const imageList = ref<string[]>([]);
|
|
|
+ const roomInfo = ref('');
|
|
|
watchEffect(() => {
|
|
|
if (unref(showPanel)) {
|
|
|
animateActive.value = true;
|
|
|
} else {
|
|
|
animateActive.value = false;
|
|
|
}
|
|
|
+ if (room.value?.image) {
|
|
|
+ imageList.value = room.value.image;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (room.value?.roomInfo) {
|
|
|
+ console.log('roomInfo', room.value.roomInfo);
|
|
|
+ roomInfo.value = room.value.roomInfo;
|
|
|
+ // imageList.value = room.value.image;
|
|
|
+ }
|
|
|
});
|
|
|
+
|
|
|
const handleViewer = (index: number) => {
|
|
|
showViewer.value = true;
|
|
|
currentImage.value = index;
|
|
|
};
|
|
|
- const MockImageList = [
|
|
|
- {
|
|
|
- url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
- },
|
|
|
- {
|
|
|
- url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
- },
|
|
|
- {
|
|
|
- url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
- },
|
|
|
- {
|
|
|
- url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
- },
|
|
|
- {
|
|
|
- url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
- },
|
|
|
- {
|
|
|
- url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
- },
|
|
|
- {
|
|
|
- url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
- },
|
|
|
- {
|
|
|
- url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
- },
|
|
|
- {
|
|
|
- url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
- },
|
|
|
- {
|
|
|
- url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
- },
|
|
|
- {
|
|
|
- url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
- },
|
|
|
- {
|
|
|
- url: 'https://4dkk.4dage.com/head/15915816041/head_1673602197881.png?m=1673602198194',
|
|
|
- },
|
|
|
- ];
|
|
|
+
|
|
|
const handleClose = () => {
|
|
|
appStore.setShowIntroPanel(false);
|
|
|
};
|
|
|
- onMounted(() => {
|
|
|
- setTimeout(() => {
|
|
|
- appStore.setShowIntroPanel(true);
|
|
|
- }, 5000);
|
|
|
- });
|
|
|
+ onMounted(() => {});
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -119,20 +93,25 @@
|
|
|
}
|
|
|
.layer {
|
|
|
width: 100%;
|
|
|
+ height: 100%;
|
|
|
position: fixed;
|
|
|
bottom: 0;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
z-index: 10000;
|
|
|
// display: none;
|
|
|
.layer-content {
|
|
|
- position: absolute;
|
|
|
- width: 100%;
|
|
|
+ position: relative;
|
|
|
+ width: 600px;
|
|
|
font-size: 14px;
|
|
|
height: calc(var(--vh) * 60);
|
|
|
- bottom: 0;
|
|
|
color: white;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
z-index: 0;
|
|
|
+ margin: 0 auto;
|
|
|
+ top: 40%;
|
|
|
&::before {
|
|
|
content: ' ';
|
|
|
background: rgba(0, 0, 0, 0.9);
|
|
@@ -164,6 +143,13 @@
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
|
+ [is-mobile] {
|
|
|
+ .layer .layer-content {
|
|
|
+ width: 100%;
|
|
|
+ left: 0;
|
|
|
+ transform: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
.tabs-component {
|
|
|
width: 100%;
|
|
|
min-height: 100%;
|