123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- <template>
- <div class="parent-body">
- <!-- 热点 -->
- <!-- <hot/> -->
- <!-- 热点弹出框 -->
- <popup />
- <!-- 加载初始页面 -->
- <div id="gui-thumb"></div>
- <!-- 场景canvs主容器 -->
- <div id="player"></div>
- <!-- 底部菜单 -->
- <div id="gui-parent">
- <!-- 进度条加载 -->
- <gui-loading />
- <div id="hot"></div>
- <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 @toHome="showWelcome = true" />
- <!-- 导览 -->
- <v-guide />
- <!-- logo -->
- <div
- id="myCompany"
- style="
- width: 100%;
- position: absolute;
- bottom: 0px;
- 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">
- <div class="gui-spinner-icon"></div>
- </div>
- <!-- guimsg -->
- <guimsg />
- <!-- 错误提示 -->
- <v-error />
- <vr-con />
- <v-other />
- <welcome @close="hideWelcome" v-if="showWelcome" />
- <div class="loading" v-if="0">
- <span>加载中...</span>
- </div>
- </div>
- <!-- 左上方logo -->
- <!-- <div class="leftTopLogo" v-show="!isMobile">
- <img src="../assets/img/home/logo.png" alt="" />
- </div> -->
- </div>
- </template>
- <script>
- import popup from "@/views/popup";
- import guiLoading from "@/views/gui/loading";
- import hotspotList from "@/views/gui/hotspotlist";
- import vTitle from "@/views/gui/title";
- import vMenu from "@/views/gui/menu";
- import vGuide from "@/views/gui/guide";
- import webVr from "@/views/gui/webvr";
- import guimsg from "@/views/gui/guimsg";
- import vError from "@/views/gui/error";
- import vrCon from "@/views/gui/vrcon";
- import vOther from "@/views/gui/other";
- import welcome from "@/components/welcome";
- import { addVisitAPI } from "../utils/api";
- export default {
- name: "Home",
- components: {
- popup,
- guiLoading,
- hotspotList,
- vTitle,
- vMenu,
- vGuide,
- webVr,
- guimsg,
- vError,
- vrCon,
- vOther,
- welcome,
- },
- data() {
- return {
- showWelcome: true,
- hotspots: "",
- loading: true,
- };
- },
- methods: {
- hideWelcome() {
- this.showWelcome = false;
- // window.manage.switchBgmState(true);
- },
- getHotSpotList() {
- $.ajax({
- url:
- g_Prefix +
- "data/" +
- window.number +
- "/hot/js/data.js" +
- "?" +
- Math.random(),
- type: "get",
- dataType: "json",
- contentType: "application/json",
- success: (result) => {
- this.hotspots = result;
- },
- });
- },
- },
- mounted() {
- this.$nextTick(() => {
- window.evt = document.createEvent("HTMLEvents");
- window.evt.initEvent("loadfinish", false, false);
- window.addEventListener("loadfinish", () => {
- this.loading = false;
- // document.title = "珠海高新区中共党史学习教育园地线上展厅";
- this.getHotSpotList();
- window.player.on("openTips", () => {
- this.$showTips();
- });
- window.player.on("openHotspot", (data) => {
- this.$showHotspot({
- hotspot: this.hotspots[data],
- });
- });
- });
- });
- },
- async created() {
- // 发送访问量
- try {
- await addVisitAPI();
- } catch (e) {
- console.log(e);
- }
- },
- };
- </script>
- <style lang="less" scoped>
- .parent-body {
- width: 100%;
- height: 100%;
- }
- .loading {
- position: fixed;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- z-index: 10000;
- background: #000;
- > span {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- color: #fff;
- font-size: 16px;
- display: inline-block;
- }
- }
- .leftTopLogo {
- pointer-events: none;
- position: fixed;
- z-index: 11000;
- top: 30px;
- left: 30px;
- }
- </style>
|