tremble 4 gadi atpakaļ
vecāks
revīzija
6f34a49215

+ 6 - 1
web/public/static/js/main_2020_show.js

@@ -35,7 +35,7 @@ g_tourAudio.oncanplaythrough = function() {
 
 
 
- 
+let ponaid = "1c8790272448494b8a3d4148d27af14c"  //三大会议ponaid
 
 window.menuSanda = null // 三大会议的总plane
 
@@ -19663,6 +19663,11 @@ window.Modernizr = function(n, e, t) {
             n.prototype.enter = function() {
                 var e = null;
                 return function() {
+                    
+                    if(this.id == ponaid) {
+                        window.player.emit("openTips")
+                    }
+
                     this.setZoomed(!1),
                     this.emit("enter", {
                         oldPano: e,

+ 0 - 23
web/public/static/js/manage.js

@@ -113,30 +113,7 @@ Manage.prototype.loadAudio = function() { //相关:g_tourAudio \  g_playAudio
     
     //https://www.cnblogs.com/interdrp/p/4211883.html   部分资料
     g_bgAudio.load();	// iOS 9   还需要额外的 load 一下, 否则直接 play 无效
-    var play = function(){
-        //if(window.tourAudioSta) return;
-         
-        this.switchBgmState(true)
-
-        window.player.emit&&window.player.emit('autoplay')
-        
-        document.removeEventListener("touchstart",play);
-        document.removeEventListener("click",play);
-        $('#player')[0].removeEventListener("touchstart", play);
-    }.bind(this);
     
-    g_bgAudio.oncanplay = ()=>{ 
-        this.switchBgmState(true)
-    }
-    document.addEventListener("WeixinJSBridgeReady", ()=> {
-        this.switchBgmState(true)
-    }, false);
-    
-    document.addEventListener("touchstart", play);//ios需要加个事件才能播放 不能自动播放;如果还有浏览器不行,换成别的交互事件
-    document.addEventListener("click", play);
-    if ($('#player')[0]) {
-     $('#player')[0].addEventListener("touchstart", play);
-    }
     g_bgAudio.addEventListener('ended', ()=>{ 
         this.switchBgmState(true)
     }); 

BIN
web/src/assets/images/project/tips.png


BIN
web/src/assets/images/project/tipsmb.png


+ 3 - 2
web/src/components/hotspot/index.vue

@@ -33,7 +33,9 @@ export default {
   methods:{
     close(){
       this.$hideHotspot()
-      window.manage.switchBgmState(true);
+      if(g_bgAudio && g_bgAudio.pauseByHot){
+        window.manage.switchBgmState(true);
+      }
     }
   },
   mounted(){
@@ -43,7 +45,6 @@ export default {
         this.active = !this.active ? item.id : this.active;
       }
     });
-    console.log(this.active)
     !this.active && (this.active = 'vTitle')
   },
   data(){

+ 56 - 39
web/src/components/popupLayout/Tips.vue

@@ -1,50 +1,67 @@
 <template>
-    <transition
-        appear
-        name="custom-classes-transition"
-        enter-active-class="animated fadeIn faster"
-        leave-active-class="animated fadeOut faster"
-    >
-        <popup v-if="show" :is-pass="true">
-            <div class="ui-message-tips" v-html="content"></div>
-        </popup>
-    </transition>
+  <div class="wrapper" @click="close">
+    <div class="ui-broadcast" @click="close" >
+        <img :src="require(`@/assets/images/project/${isMobile?'tipsmb.png':'tips.png'}`)">
+    </div>
+  </div>
 </template>
 <script>
-import Popup from "./popup";
 export default {
-    name: "ui-tips",
-    components: {
-        Popup
-    },
-    data() {
-        return {
-            show: false,
-            duration: 1000,
-            content: ""
-        };
-    },
-    mounted() {
-        setTimeout(() => {
-            this.show = false;
-            this.$nextTick(function() {
-                document.body.removeChild(this.$el);
-                this.$destroy(true);
-            });
-        }, this.duration);
+  data(){
+    return {
+    };
+  },
+  mounted(){
+  },
+  methods:{
+    close(){
+      this.$hideTips()
     }
+  }
 };
 </script>
+
 <style lang="less" scoped>
-.ui-message-tips {
-    position: absolute;
+.wrapper{
+  width: 100%;
+  height: 100%;
+  position: fixed;
+  left: 0;
+  top: 0;
+  z-index: 999;
+  .ui-broadcast{
+    width: 830px;
+    position: fixed;
+    padding: 48px 0;
+    z-index: 9999;
+    top: 50%;
     left: 50%;
-    top: 40%;
-    color: #fff;
-    background-color: rgba(0, 0, 0, 0.8);
-    padding: 20px 50px;
-    transform: translate(-40%, -50%);
-    border-radius: 10px;
-    box-shadow: 0 0px 35px rgba(0, 0, 0, 0.3);
+    transform: translate(-50%,-50%);
+    text-align: center;
+
+    >img{
+        width: 100%;
+    }
+    
+  }
+}
+
+@media screen and (max-width: 500px) {
+ .wrapper{
+   z-index: 99999;
+  .ui-broadcast{
+    width: 88%;
+    position: fixed;
+    padding: 28px 0 30%;
+    top: 46%;
+    left: 50%;
+    transform: translate(-50%,-50%);
+    text-align: center;
+    >img{
+        width: 100%;
+    }
+  }
+}
+
 }
 </style>

+ 28 - 0
web/src/components/popupLayout/index.js

@@ -1,10 +1,13 @@
 import Vue from 'vue'
 import UILoading from './Loading.vue'
 import UIShare from './Share.vue'
+import UITips from './Tips.vue'
 
 
 const Loading = Vue.extend(UILoading)
 const Share = Vue.extend(UIShare)
+const Tips = Vue.extend(UITips)
+
 
 
 let loadingInstance = ''
@@ -54,3 +57,28 @@ export function $hideShare() {
         shareInstance = ''
     }
 }
+
+
+
+let tipsInstance = ''
+export function $showTips(data={}) {
+    if (tipsInstance) {
+        return
+    }
+    tipsInstance = new Tips({
+        data
+    }).$mount()
+
+    document.body.appendChild(tipsInstance.$el)
+
+    Vue.nextTick(() => {
+        tipsInstance.show = true
+    })
+}
+
+export function $hideTips() {
+    if (tipsInstance) {
+        document.body.removeChild(tipsInstance.$el)
+        tipsInstance = ''
+    }
+}

+ 5 - 1
web/src/mixins/index.js

@@ -4,6 +4,8 @@ import browser from '@/utils/browser'
 import {
   $showShare,
   $hideShare,
+  $showTips,
+  $hideTips
 } from '@/components/popupLayout'
 
 import {$showHotspot,$hideHotspot } from '@/components/hotspot/index.js'
@@ -21,7 +23,9 @@ Vue.mixin({
       $showShare,
       $hideShare,
       $showHotspot,
-      $hideHotspot
+      $hideHotspot,
+      $showTips,
+      $hideTips
       // $showLoading,
       // $showBroadcast,
       // $hideBroadcast

+ 138 - 120
web/src/pages/Home.vue

@@ -3,158 +3,176 @@
     <!-- 热点 -->
     <!-- <hot/> -->
     <!-- 热点弹出框 -->
-    <popup/>
+    <popup />
     <!-- 加载初始页面 -->
     <div id="gui-thumb"></div>
-  
+
     <!-- 主容器 -->
     <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/>
-            
-            <!-- 导览 -->
-            <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>
+      <!-- 进度条加载 -->
+      <gui-loading />
+      <div id="gui" style="display: none;">
+        <!-- 退出VR模式按钮 -->
+        <div id="vrOff">
+          <img id="vrOffImg" src="images/vrOffImg.png" alt="" />
         </div>
 
-        <!-- vr -->
-        <web-vr/>
+        <!-- 热点列表 -->
+        <hotspot-list />
+
+        <!-- 标题 -->
+        <v-title />
+
+        <!-- 底部菜单 -->
+        <v-menu />
 
-        <!-- loading -->
-        <div id="gui-spinner" style="display: none;">
-            <div class="gui-spinner-icon"></div>
+        <!-- 导览 -->
+        <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>
 
-        <!-- guimsg -->
-        <guimsg/>
+      <!-- vr -->
+      <web-vr />
 
-        <!-- 错误提示 -->
-        <v-error/>
+      <!-- loading -->
+      <div id="gui-spinner" style="display: none;">
+        <div class="gui-spinner-icon"></div>
+      </div>
 
-        <vr-con/>
-        
-        <v-other/>
+      <!-- guimsg -->
+      <guimsg />
 
-        <welcome @close='showWelcome=false' v-if="showWelcome"/>
-    </div>
+      <!-- 错误提示 -->
+      <v-error />
+
+      <vr-con />
 
+      <v-other />
+
+      <welcome @close="hideWelcome" v-if="showWelcome" />
+
+        <div class="loading" v-if="loading">
+            <span>加载中...</span>
+        </div>
+    </div>
   </div>
 </template>
 
 <script>
-import Vue from 'vue'
-
-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 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";
 
 export default {
-  name: 'Home',
+  name: "Home",
   components: {
-      popup,
-      guiLoading,
-      hotspotList,
-      vTitle,
-      vMenu,
-      vGuide,
-      webVr,
-      guimsg,
-      vError,
-      vrCon,
-      vOther,
-      welcome
+    popup,
+    guiLoading,
+    hotspotList,
+    vTitle,
+    vMenu,
+    vGuide,
+    webVr,
+    guimsg,
+    vError,
+    vrCon,
+    vOther,
+    welcome,
   },
- 
-  data(){
-      return {
-          showWelcome: true,
-          hotspots:''
-      }
+
+  data() {
+    return {
+      showWelcome: true,
+      hotspots: "",
+      loading: true
+    };
   },
 
-  methods:{
-        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
-                }
-            });
-          
-      }
+  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(){
+  mounted() {
     this.$nextTick(() => {
-        window.evt =  document.createEvent('HTMLEvents')
-        window.evt.initEvent('loadfinish',false,false)
-        window.addEventListener('loadfinish',  ()=> {
-            this.getHotSpotList()
-            window.player.on("openHotspot", (data)=> {
-                this.$showHotspot({
-                    hotspot:this.hotspots[data]
-                })
-            })
-        })
-      })
-  }
-}
+      window.evt = document.createEvent("HTMLEvents");
+      window.evt.initEvent("loadfinish", false, false);
+      window.addEventListener("loadfinish", () => {
+        this.loading=false
+        this.getHotSpotList();
+        window.player.on("openTips", () => {
+          this.$showTips()
+        });
+
+        window.player.on("openHotspot", (data) => {
+          this.$showHotspot({
+            hotspot: this.hotspots[data],
+          });
+        });
+      });
+    });
+  },
+};
 </script>
 
 <style lang="less" scoped>
-.parent-body{
-    width: 100%;
-    height: 100%;
+.parent-body {
+  width: 100%;
+  height: 100%;
 }
-.hover-pages{
+
+.loading{
     position: fixed;
-    top: 0;
     left: 0;
+    top: 0;
     width: 100%;
     height: 100%;
-    z-index: 9999;
-    background: rgba(0, 0, 0, 0.8);
-}
-
-.exhibition{
-  position: fixed;
-  top: 50px;
-  right: 0;
-  z-index: 99;
-}
-.exhibition-mb{
-}
-</style>
+    z-index: 10000;
+    background: #000;
+    >span{
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%,-50%);
+      color: #fff;
+      font-size: 16px;
+      display: inline-block;
+    }
+  }
+</style>

+ 8 - 1
web/src/views/gui/menu.vue

@@ -196,7 +196,7 @@
             </div>
           </div>
 
-          <div @click="isShare = !isShare">
+          <div @click="handleshare">
             <div>
               <img
                 :src="
@@ -280,6 +280,13 @@ export default {
       })
   },
   methods: {
+    handleshare(){
+      if (this.isShare) {
+        return
+      }
+
+      this.isShare = true
+    },
     switchBGM() {
       if ($("#volume img")[0].src.indexOf("on.png") > -1) {
         window.manage.switchBgmState(true);