123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- <template>
- <div class="parent-body">
- <!-- 热点 -->
- <hot/>
- <!-- 热点弹出框 -->
- <popup/>
- <!-- 加载初始页面 -->
- <div id="gui-thumb"></div>
- <!-- cad -->
- <cad/>
- <!-- 主容器 -->
- <div id="player"></div>
- <div id="gui-parent">
- <!-- 进度条加载 -->
- <gui-loading/>
- <div id="gui" style="display: none;">
- <!-- 退出VR模式按钮 -->
- <div id="vrOff">
- <img id="vrOffImg" src="images/vrOffImg.png" alt="">
- </div>
- <!-- 热点列表 -->
- <hotspot-list/>
- <!-- 标题 -->
- <v-title/>
- <!-- 底部菜单 -->
- <v-menu @btnactive="handleActive"/>
-
- <!-- 导览 -->
- <v-guide/>
- <!-- logo -->
- <div id="myCompany"
- style="width:100%;position:absolute;bottom:20px;text-align:center;font-size:14px;font-family: '微软雅黑';font-weight:580;color: rgba(255, 255, 255, 0.8);">
- 四维时代提供技术支持
- </div>
- </div>
- <!-- vr -->
- <web-vr/>
- <!-- loading -->
- <div id="gui-spinner" style="display: none;">
- <div class="gui-spinner-icon"></div>
- </div>
- <!-- guimsg -->
- <guimsg/>
- <!-- 错误提示 -->
- <v-error/>
- <vr-con/>
-
- <v-other/>
-
- </div>
- <exhibition class="exhibition"/>
- <Danmaku
- class="danmaku"
- :quotes="danmu"
- :showIcon="require(`@/assets/images/icon/danmu_open_${theme}.png`)"
- :closeIcon="require('@/assets/images/icon/danmu_close.png')"
- :arrowIcon="require('@/assets/images/icon/danmu_top.png')"
- />
- <vpopup @close="handlepopClose" :cp="cp" v-if="cp"/>
- </div>
- </template>
- <script>
- import hot from './hot';
- import popup from './popup';
- import cad from './cad';
- import guiLoading from './gui/loading';
- import hotspotList from './gui/hotspotlist';
- import vTitle from './gui/title';
- import vMenu from './gui/menu';
- import vGuide from './gui/guide';
- import webVr from './gui/webvr';
- import guimsg from './gui/guimsg';
- import vError from './gui/error';
- import vrCon from './gui/vrcon';
- import vOther from './gui/other';
- import exhibition from '@/components/exhibition';
- import vpopup from './components/popup.vue'
- export default {
- name: 'Home',
- components: {
- hot,
- popup,
- cad,
- guiLoading,
- hotspotList,
- vTitle,
- vMenu,
- vGuide,
- webVr,
- guimsg,
- vError,
- vrCon,
- vOther,
- exhibition,
- vpopup
- },
- watch:{
- '$route.query.route':function (newVal) {
- this.page = newVal
- }
- },
- mounted(){
- this.$bus.$on('opendaolan',()=>{
- this.showExhibition = true
- })
- this.starLoad()
- },
- methods:{
- starLoad(){
- window.loadMainJs()
- window.loadMange()
- window.loadScene()
- },
- handleClose(){
- $('.cad').css('transform', 'translate(-150%,-50%)')
- this.showExhibition=false
- },
- handlepopClose(){
- this.cp = ''
- this.$bus.$emit('resetbtnactive')
- },
- handleActive(data){
- if (data=='question') {
- this.cp = 'question'
- }
- console.log(data)
- }
- },
- beforeDestroy(){
- window.hadLoad = true
- if (window.player) {
- window.player.sceneRenderer.suspend()
- window.player = ''
- $('.parent-body').remove()
- }
- },
- data(){
- return {
- danmu:[
- "很漂亮的线上展馆,支持!",
- "足不出户就能浏览参观,太棒了!",
- "期待能有机会到实体馆参观。",
- "请问英模在第几展区?",
- "向革命先烈们致敬。",
- "展馆的信息介绍很详细,干货满满!",
- "向人民解放军致敬"
- ],
- page: this.$route.query.route,
- showExhibition: false,
- cp:''
- }
- }
- }
- </script>
- <style lang="less" scoped>
- .parent-body{
- width: 100%;
- height: calc(100vh - 100px);
- margin-top: 100px;
- padding-top: 0;
- position: relative;
- overflow: hidden;
- }
- .danmaku{
- position: absolute;
- bottom: 10px;
- left: 34px;
- z-index: 99;
- width: 340px;
- }
- .exhibition{
- position: absolute;
- top: 50px;
- right: 0;
- z-index: 99;
- }
- </style>
|