Bladeren bron

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

xzw 4 jaren geleden
bovenliggende
commit
36d37255fb

+ 2 - 2
web/public/static/js/main_2020_show.js

@@ -8201,8 +8201,8 @@ window.Modernizr = function(n, e, t) {
             }, e)
             //csz 用户引导界面
             var helpData = {
-                "pc":["images/pc_step1.png","images/pc_step2.png","images/pc_step3.png"],
-                "mobile":["images/phone_step1.png","images/phone_step2.png","images/phone_step3.png"]
+                "pc":["static/images/pc_step1.png","static/images/pc_step2.png","static/images/pc_step3.png"],
+                "mobile":["static/images/phone_step1.png","static/images/phone_step2.png","static/images/phone_step3.png"]
             }
             var navIcon = $(".nav-icon .icon");
             if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) navIcon.attr("src",helpData.mobile[0]);

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

@@ -117,6 +117,8 @@ Manage.prototype.loadAudio = function() { //相关:g_tourAudio \  g_playAudio
         //if(window.tourAudioSta) return;
          
         this.switchBgmState(true)
+
+        window.player.emit('autoplay')
         
         document.removeEventListener("touchstart",play);
         document.removeEventListener("click",play);

BIN
web/src/assets/videos/kangri/1.mp4


BIN
web/src/assets/videos/kangri/2.mp4


BIN
web/src/assets/videos/kangri/3.mp4


BIN
web/src/assets/videos/kangri/4.mp4


BIN
web/src/assets/videos/kangri/5.mp4


+ 1 - 1
web/src/components/hotspot/image.vue

@@ -24,7 +24,7 @@
       <ul class="pagna">
         <li v-for="(item,i) in hotspot.images" :class="{active: i == mbactive}" :key="i"></li>
       </ul>
-      <div class="desc">
+      <div v-if="hotspot.content" class="desc">
         <p>简介:</p>
         <div v-html="hotspot.content"></div>
       </div>

+ 64 - 1
web/src/components/hotspot/video.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="images" :style="{backgroundImage:`url(${require('@/assets/images/project/video_bg.jpg')})`}">
+  <div v-if="!isMobile" class="images" :style="{backgroundImage:`url(${require('@/assets/images/project/video_bg.jpg')})`}">
     <div class="title">{{hotspot.title}}</div>
     <div class="img-con">
       <span @click="active-=1" :class="{noshow:active<=0}">上一张</span>
@@ -15,6 +15,16 @@
     <div class="desc" v-html="hotspot.content">
     </div>
   </div>
+  <div v-else class="mbimages" :style="{backgroundImage:`url(${require('@/assets/images/project/mb_hostpot.jpg')})`}">
+      <div class="title">{{hotspot.title}}</div>
+      
+
+      
+      <div v-if="hotspot.content" class="desc">
+        <p>简介:</p>
+        <div v-html="hotspot.content"></div>
+      </div>
+    </div>
 </template>
 
 <script>
@@ -109,4 +119,57 @@ export default {
     overflow-y: auto;
   }
 }
+
+@position:62px;
+.mbimages{
+  width: 100%;
+  height: 100%;
+  background-repeat: no-repeat;
+  background-size: 100% calc(100% + @position);
+  background-position: 0 -@position;
+  text-align: center;
+  .title{
+    width: 90%;
+    padding: 10px;
+    display: inline-block;
+    color: #DBA761;
+    font-weight: bold;
+    font-size: 18px;
+    background: #BC1515;
+    border-radius: 60px;
+    margin: 20px auto;
+  }
+  
+  .videocon{
+    display: flex;
+    justify-content: space-around;
+    align-items: center;
+    position: relative;
+    padding-bottom: 40px;
+    >video{
+      max-width: 1000px;
+      border: 10px solid #BC1515;
+      box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
+      max-height: 600px;
+    }
+  }
+
+  .desc{
+    color: #DBA761;
+    text-align: left;
+    width: 85%;
+    margin: 20px auto 0;
+    p{
+      font-size: 16px;
+      font-weight: bold;
+    }
+    div{
+      font-size: 14px;
+      margin-top: 10px;
+      line-height: 1.5;
+      max-height: 50vh;
+      overflow-y: auto;
+    }
+  }
+}
 </style>

+ 19 - 7
web/src/components/kangri/index.vue

@@ -2,10 +2,10 @@
   <div id="kangri" class="kangri">
     <div class="kangricon">
       <span @click="active-=1,autoplay()" :class="{noshow:active<=0}">上一张</span>
-      <video ref="video" autoplay>
-        <source :src="require(`@/assets/videos/${videocon[active].video}`)" type="video/mp4">
+      <video ref="video" autoplay loop :key="active">
+        <source :src="require(`@/assets/videos/kangri/${videocon[active].video}`)" type="video/mp4">
       </video> 
-      <span @click="active+=1,autoplay()" :class="{noshow:active>=2}">下一张</span>
+      <span @click="active+=1,autoplay()" :class="{noshow:active>=videocon.length-1}">下一张</span>
     </div>
   </div>
 </template>
@@ -14,15 +14,23 @@
 let videocon = [
   {
     id:'1',
-    video:'chen.mp4'
+    video:'1.mp4'
   },
   {
     id:'2',
-    video:'li.mp4'
+    video:'2.mp4'
   },
   {
     id:'3',
-    video:'mao.mp4'
+    video:'3.mp4'
+  },
+  {
+    id:'4',
+    video:'4.mp4'
+  },
+  {
+    id:'5',
+    video:'5.mp4'
   }
 ]
 export default {
@@ -43,7 +51,9 @@ export default {
     }
   },
   mounted(){
-    this.autoplay()
+    window.player.on("autoplay", ()=> {
+        this.autoplay()
+    })
   }
 }
 </script>
@@ -71,8 +81,10 @@ export default {
    align-items: center;
    >video{
      width: 50%;
+     background-color: #000;
      height: 100%;
      pointer-events: auto;
+     object-fit: fill;
    }
    >span{
       pointer-events: auto;

+ 1 - 1
web/src/pages/Home.vue

@@ -105,7 +105,7 @@ export default {
  
   data(){
       return {
-          showWelcome: true,
+          showWelcome: false,
           hotspots:''
       }
   },