Selaa lähdekoodia

Merge branch 'master' of http://192.168.0.115:3000/chenzhiguang/zhengzhou_university

xzw 4 vuotta sitten
vanhempi
commit
a5fc237aab

BIN
web/public/static/images/Volume btn_off.png


BIN
web/public/static/images/Volume btn_on.png


+ 16 - 4
web/public/static/js/main_2020_show.js

@@ -31,6 +31,8 @@ var firstIn = true
 var changeBGM = function(id){
     let areaArr = Object.keys(areaInfo)
     let flagnext = true
+
+    let danTime = 3000 //毫秒
     areaArr.forEach(function (i){
         if(flagnext && areaInfo[i]){
             for(let j in areaInfo[i]){
@@ -40,16 +42,26 @@ var changeBGM = function(id){
                             return 
                         }
                         currentAudio = i
-                        g_bgAudio.src =  areaAudio[i];
                         console.log(areaAudio[i],'====')
-                        if(!firstIn){
-                            manage.switchBgmState(true)
+                        if($("#volume img")[0].src.indexOf("btn_off.png")>-1){
+                            $(g_bgAudio).animate({volume: 0.0}, danTime);
+                            
+                            setTimeout(() => {
+                                if(!firstIn){
+                                    g_bgAudio.src =  areaAudio[i];
+                                    g_bgAudio.play()
+                                    $(g_bgAudio).animate({volume: 0.1}, danTime);
+                                    // manage.switchBgmState(true)
+                                }
+                            }, danTime+500);
+                        }
+                        else{
+                            g_bgAudio.src =  areaAudio[i];
                         }
                     return
                 }
             }
         }
-
     })
 }
 

+ 2 - 3
web/public/static/js/manage.js

@@ -110,7 +110,6 @@ Manage.prototype.loadAudio = function() { //相关:g_tourAudio \  g_playAudio
     g_bgAudio.loop = true;
     g_bgAudio.autoplay = false;
     g_bgAudio.id = "bgaudio";
-    g_bgAudio.volume = 0.4;
 
     
     //https://www.cnblogs.com/interdrp/p/4211883.html   部分资料
@@ -173,7 +172,7 @@ Manage.prototype.switchBgmState = function(state){
         $("#volume a img").attr("src", "./static/images/Volume btn_on.png")
         $("#volume").attr("title", "打开声音");
     }
-    g_bgAudio.volume = 0.4
+    g_bgAudio.volume = 0.1
     
     if(state ){
         g_bgAudio.play(); 
@@ -186,7 +185,7 @@ Manage.prototype.switchBgmState = function(state){
     }else{
         g_bgAudio.pause();
         paused()
-    } 
+    }
     
     g_bgAudio.pauseByHot = false
     g_bgAudio.pauseByTour = false

+ 5 - 4
web/public/static/js/myShow.js

@@ -72,7 +72,6 @@ var areaInfo = {
   '5251d74caf644ed89b56895864f334cb',
   '5b1d60d44f2b4da786287769c649cc3e',
   '616032a5d4bd4722ab7f0a950b8776de',
-  '693902daf5594145a75538bc2f421d26',
   'feed5fb6bb944706b4418e7994609759',
   'cdf10b4c3dd047479f5c2c7e7b742d84',
   '1ceaa695db1b4a738d5f1ca30c6333d1',
@@ -82,7 +81,9 @@ var areaInfo = {
   '6b96fe50bae043df947d07a0328d5016',
   '294fd03f027b4c6f961d7d48c89f911f',
   '5e3ee448fb244f8498dc0ef2d318a6d4'], //序厅
-  2:['fa0c42b9245e4fadb2ba3d4dd212b45a',
+  2:[
+  '693902daf5594145a75538bc2f421d26',
+  'fa0c42b9245e4fadb2ba3d4dd212b45a',
   '5c749805e878411cb4899e9d15073452',
   '8659a04d34d14cdea438abc5818b1cb2',
   '435070db318340a8853f439dbfaba29b',
@@ -244,8 +245,8 @@ var areaAudio = {
 
 var settings = {
     overlay:{
-		width:1, height:0.5, depth:0.02
-	}  
+      width:1, height:0.5, depth:0.02
+    }  
 }
 if(window.number == '725'||window.number == '724'){
     settings.mobileNavHigh = true

BIN
web/src/assets/video/welcome.mp4


+ 24 - 25
web/src/components/mapsvg.vue

@@ -470,39 +470,38 @@ export default {
 // #a01c26
 #Ditu{
   >g{
-    &:not(#_10,#_9,#_8){
-      cursor: pointer;
-      &:hover{
-        >path{
-          fill: #a01c26;
-        
-        }
-        >g{
+    &:not(#_10):not(#_8):not(#_9){
+        cursor: pointer;
+        &:hover{
           >path{
+            fill: #a01c26;
+          
+          }
+          >g{
+            >path{
+              fill: #fcd67b;
+              display: none;
+            }
+          }
+          ellipse{
+            display: none;
             fill: #fcd67b;
+          }
+          text{
+            fill: #a01c26;
             display: none;
           }
+          .hovertext{
+            display: block;
+            fill: #fff;
+            letter-spacing: 1px;
+          }
         }
-        ellipse{
-          display: none;
-          fill: #fcd67b;
-        }
-        text{
-          fill: #a01c26;
-          display: none;
-        }
+
         .hovertext{
-          display: block;
-          fill: #fff;
-          letter-spacing: 1px;
+          display: none;
         }
-      }
-
-      .hovertext{
-        display: none;
-      }
     }
   }
-
 }
 </style>

+ 4 - 3
web/src/components/welcome/index.vue

@@ -8,7 +8,6 @@
 
     <video ref="welcome" >
       <source :src="require('@/assets/video/welcome.mp4')" type="video/mp4">
-      <source :src="require('@/assets/video/welcome.webm')" type="video/webm">
     </video> 
 
     <span v-if="isVideo" class="btn jump" @click="$bus.$emit('toggleWelcome', false)">跳过</span>
@@ -23,13 +22,15 @@ export default {
   data(){
     return {
       isVideo: false,
-      loading:false
+      loading:true
     }
   },
   methods:{
     showVideo(){
       this.isVideo=true
-      this.$refs.welcome.play();
+      setTimeout(() => {
+        this.$refs.welcome.play(); 
+      });
     }
   },
   mounted(){

+ 4 - 0
web/src/main.js

@@ -1,6 +1,10 @@
 import Vue from 'vue'
 import App from './App.vue'
 import '@/mixins'
+import Videojs from 'video.js'
+import 'video.js/dist/video-js.css'
+ 
+Vue.prototype.$video = Videojs
 
 
 Vue.config.productionTip = false