tremble 3 년 전
부모
커밋
02cf8b8b28

+ 5 - 4
web/public/scene.html

@@ -11,7 +11,8 @@
     <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/css/oldVer/main0.css"/>
     <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/css/main.css?v=2.25"/>
     <script class="build keep">
-        var number = window.location.href.substring(window.location.href.indexOf("=") + 1);
+        var number = window.location.href.substring(window.location.href.indexOf("m=") + 2);
+        var firstViewPosi = window.location.href.indexOf("&firstView") > -1;
 
         if (window.performance) {
             window.navigationStart = window.performance.timing.navigationStart;
@@ -22,17 +23,17 @@
     <title>中国人民武装警察部队新疆生产建设兵团总队史馆门户网站</title>
   </head>
   <body>
+    <div id="app"></div>
+
     <script src="<%= VUE_APP_STATIC_DIR %>/js/lib/jquery-2.1.1.min.js" class="build keep"></script>
     <script src="<%= VUE_APP_STATIC_DIR %>/js/lib/player-0.0.12.min.js" class="build keep"></script>
     <script src="<%= VUE_APP_STATIC_DIR %>/js/Tween.js"></script>
     <script src="<%= VUE_APP_STATIC_DIR %>/js/manage.js"></script>
     <script src="<%= VUE_APP_STATIC_DIR %>/js/Hot.js"></script>
-    <script src="<%= VUE_APP_STATIC_DIR %>/js/main_2020_show.js"></script>
-
     <script src="<%= VUE_APP_STATIC_DIR %>/js/lib/OBJLoader.js"></script>
+    <script src="<%= VUE_APP_STATIC_DIR %>/js/main_2020_show.js"></script>
     <script src="<%= VUE_APP_STATIC_DIR %>/js/CAD/bundle.js"></script>
     <script src="<%= VUE_APP_STATIC_DIR %>/js/CAD/loadCAD.js"></script>
 
-    <div id="app"></div>
   </body>
 </html>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 11 - 11
web/public/static/js/main_2020_show.js


BIN
web/src/assets/images/lunbotu.jpg


+ 65 - 5
web/src/assets/theme/theme.less

@@ -665,7 +665,7 @@
       right: 298px;
       background: rgba(0, 0, 0, 0.4);
       border-radius: 5px 0px 0px 5px;
-      top: 24%;
+      top: 124px;
       padding: 10px;
       > img {
         width: 16px;
@@ -694,13 +694,73 @@
     .exhi-list {
       border-top: 2px solid @color;
       width: 100%;
+      max-height: 210px;
+      overflow-y: auto;
       > li {
-        height: 36px;
+        text-align: left;
+        min-height: 36px;
         line-height: 36px;
-        padding: 0 30px;
         cursor: pointer;
-        &:hover,&.active {
-          background: @backcolor;
+        position: relative;
+      
+
+        >span{
+          width: 100%;
+          padding-left: 40px;
+          display: inline-block;
+          &:hover,&.active {
+            background: @backcolor;
+          }
+        }
+        @w:5px;
+
+        &.haveChild{
+          &::before{
+            content: '';
+            display: inline-block;
+            width: 0;
+            height: 0;
+            top: 14px;
+            left: 20px;
+            position: absolute;
+            border-top: @w solid transparent;
+            border-bottom: @w solid transparent;
+            border-left: @w*2 solid #fff;
+          }
+        }
+       
+        >ul{
+          max-height: 0;
+          overflow: hidden;
+          transition: all ease .3s;
+          >li{
+            padding-left: 56px;
+              &:hover,&.active {
+                background: @backcolor;
+              }
+          }
+
+          
+        }
+
+        &.showactive{
+          &.haveChild{
+            &::before{
+              content: '';
+              display: inline-block;
+              width: 0;
+              height: 0;
+              top: 14px;
+              left: 20px;
+              position: absolute;
+              border-left: @w solid transparent;
+              border-right: @w solid transparent;
+              border-top: @w*2 solid #fff;
+            }
+          }
+          >ul{
+            max-height: 160px;
+          }
         }
       }
     }

+ 146 - 74
web/src/components/exhibition/index.vue

@@ -1,86 +1,160 @@
 <template>
-  <div class="parimaryExhibtion" :class="{daolanactive:isShow}">
+  <div class="parimaryExhibtion" :class="{ daolanactive: isShow }">
     <div class="p-title">
-      <span>当前位置:{{current.name}}</span>
+      <span>当前位置:{{ current.name }}</span>
     </div>
     <div class="cad-con"></div>
     <ul class="exhi-list">
-      <li :class="{active:item.id == current.id}" @click="handleItem(item)" v-for="(item,i) in list" :key="i">
-        {{item.name}}
+      <li :class="{ haveChild: item.id == 'jishechengjiu', showactive: shensuo }" @click="handleItem(item)" v-for="(item, i) in list" :key="i">
+        <span :class="{ active: item.name == current.name }">{{ item.name }}</span>
+        <ul v-if="item.id == 'jishechengjiu'">
+          <li :class="{ active: sub.name == current.name }" @click="handleItem(sub)" v-for="(sub, ii) in subList" :key="ii">
+            {{ sub.name }}
+          </li>
+        </ul>
       </li>
     </ul>
-    <div class="daolan" @click="isShow = !isShow ">
-      <img :src="require('@/assets/images/icon/daolan.png')">
-      <span>{{isShow?'收起':'展开'}}导览</span>
+    <div class="daolan" @click="isShow = !isShow">
+      <img :src="require('@/assets/images/icon/daolan.png')" />
+      <span>{{ isShow ? "收起" : "展开" }}导览</span>
     </div>
   </div>
 </template>
 
 <script>
 export default {
-  props:['showExhi'],
-  data(){
-    return{
-      isShow:true,
-      list:[
-         {
-          id:'xinjiangout',
-          name:'胡杨卫士广场',
+  props: ["showExhi"],
+  data() {
+    return {
+      isShow: true,
+      shensuo: false,
+      subList: [
+        {
+          id: "xinjiang02",
+          name: "艰苦创业铸忠诚展区",
+        },
+        {
+          id: "xinjiang03",
+          name: "奠定基础谋发展展区",
         },
         {
-          id:'xinjiang01',
-          name:'发展历程厅',
+          id: "xinjiang04",
+          name: "全面发展强根基展区",
         },
         {
-          id:'xinjiang02',
-          name:'艰苦创业厅',
+          id: "xinjiang05",
+          name: "奋进强军创一流展区",
         },
+      ],
+      list: [
         {
-          id:'xinjiang03',
-          name:'奠定基础厅',
+          id: "xinjiangout",
+          name: "胡杨卫士广场",
         },
         {
-          id:'xinjiang04',
-          name:'全面发展厅',
+          id: "xinjiang01",
+          active: "",
+          name: "序厅",
         },
         {
-          id:'xinjiang05',
-          name:'新时代新征程厅',
+          id: "xinjiang01",
+          pano: 24,
+          quat: {
+            w: 0.0790464668350327,
+            x: 0.003520409893528852,
+            y: 0.9958775678424138,
+            z: -0.04435235868632624,
+          },
+          name: "发展历程厅",
+        },
+        {
+          id: "jishechengjiu",
+          name: "建设成就厅",
+        },
+        {
+          id: "xinjiang05",
+          name: "强军劲旅厅",
+          pano: 98,
+          quat: {
+            w: 0.6813749981741799,
+            x: 0.00593363566311834,
+            y: 0.7318827124363794,
+            z: -0.0063734735088626015,
+          },
+        },
+        {
+          id: "xinjiang05",
+          name: "英模荣誉厅",
+          pano: 120,
+          quat: {
+            w: 0.7633693466573722,
+            x: -0.004737236104839399,
+            y: 0.6459324426637506,
+            z: 0.0040084588217659855,
+          },
+        },
+        {
+          id: "xinjiang05",
+          name: "辅助展陈厅",
+          pano: 186,
+          quat: {
+            w: 0.09926812639548109,
+            x: -0.0003896273924052499,
+            y: 0.9950529757251679,
+            z: 0.0039055830856510134,
+          },
         },
-        
       ],
-      current:{
-        id:'xinjiang01',
-        name:'发展历程厅',
-      }
-    }
+      current: {
+        id: "xinjiangout",
+        name: "胡杨卫士广场",
+      },
+    };
   },
-  methods:{
-    handleItem(item){
-      this.current = item
-      this.$bus.$emit('currentScene',item.id)
-    }
+  methods: {
+    handleItem(item) {
+      if (item.id == "jishechengjiu") {
+        this.shensuo = !this.shensuo;
+        return;
+      }
+      this.current = item;
+      this.$bus.$emit("currentScene", item);
+    },
   },
   mounted() {
-      this.$nextTick(()=>{
-        this.current = this.list.find(item=>item.id==window.number)
-      })
+    this.$nextTick(() => {
+      let list = this.list;
+      if (window.number != "xinjiang01"&&window.number != "xinjiangout") {
+        if (!window.firstViewPosi) {
+          list = this.subList;
+          this.shensuo = true
+        }
+      } else {
+        list = this.list;
+      }
+      this.current = list.find((item) => {
+        if (window.firstViewPosi) {
+          return player.currentPano.id == item.pano;
+        } else {
+          return item.id == window.number;
+        }
+      });
+    });
   },
-  watch:{
-    isShow(newVal){
-      let css =newVal? '10px':'-310px'
-      $('.cad').css({right:css})
-    }
-  }
-}
+  watch: {
+    isShow(newVal) {
+      let css = newVal ? "10px" : "-310px";
+      $(".cad").css({ right: css });
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
-
-.daolanactive{
+.daolanactive {
   transform: translateX(0);
-  .daolan{
-    >img{
+  .daolan {
+    > img {
       width: 16px;
       transform: rotate(0);
       margin-bottom: 4px;
@@ -90,26 +164,26 @@ export default {
 </style>
 
 <style lang="less">
-.cad{
-  .xinjiang02{
+.cad {
+  .xinjiang02 {
     transform: translateX(-40px);
   }
-  .xinjiang03{
-    >svg{
-      >g{
+  .xinjiang03 {
+    > svg {
+      > g {
         transform: scale(1) translate(50px, 198px);
       }
     }
   }
 
-   .xinjiang04{
-    >svg{
-      >g{
+  .xinjiang04 {
+    > svg {
+      > g {
         transform: scale(1.3) translate(-50px, 208px);
-        path{
-          stroke-width: 4
+        path {
+          stroke-width: 4;
         }
-        circle{
+        circle {
           r: 6;
           stroke-width: 1.69182;
         }
@@ -117,26 +191,24 @@ export default {
     }
   }
 
-  .xinjiang05{
-    >svg{
-      >g{
+  .xinjiang05 {
+    > svg {
+      > g {
         transform: scale(3) translate(-90px, 260px);
-        path{
-          stroke-width: 2
+        path {
+          stroke-width: 2;
         }
-        .sign{
-          >path{
+        .sign {
+          > path {
             // d:path("M 201.7 -168.93 L 215.111 -175.821 L 219.111 -158.779 L 201.7 -160.67 Z");
           }
-          circle{
-              r: 4;
-              stroke-width: 1.69182;
+          circle {
+            r: 4;
+            stroke-width: 1.69182;
           }
         }
-        
       }
     }
   }
 }
-
-</style>
+</style>

+ 6 - 16
web/src/views/home/Carousel.vue

@@ -1,9 +1,6 @@
 <template>
   <div class="c-con">
-    <div>
-      <img class="full" :src="data.img" alt="">
-      <img class="real" :src="data.img" alt="">
-    </div>
+    <img class="real" :src="data.img" alt="">
     <sbutton @click.native="goto" class="enter" :name="'进入数字史馆'"/>
   </div>
 </template>
@@ -66,24 +63,17 @@ export default {
 .c-con{
   position: relative;
   width: 100%;
-  >div{
-      position: relative;
+  height: 100%;
       font-size: 0;
-      .full{
-        position: absolute;
-        height: 100%;
-        width: 100%;
-        top: 0;
-        left: 50%;
-        transform: translateX(-50%);
-        filter:blur(12px);
-      }
+     
       .real{
         position: relative;
         z-index: 99;
         max-width: 100%;
+        position: absolute;
+        bottom: 0%;
+        left: 0;
       }
-    }
 }
 
 </style>

+ 2 - 0
web/src/views/home/style.less

@@ -1,4 +1,6 @@
 .home-page{
+  width: 100%;
+  height: 100%;
   .dynamic{
     display: flex;
     justify-content: space-between;

+ 21 - 5
web/src/views/scene/index.vue

@@ -5,7 +5,8 @@
       <video :poster="require('@/assets/images/poster.jpg')" autoplay ref="wevideo" controls :src="require('@/assets/video/welcone.mp4')"></video>
       <span v-if="canjump" class="jump primary primaryTxt" @click="jump">跳过</span>
     </div>
-    <iframe ref="ifr" :key="scene" :src="`scene.html?m=${scene}`" allowfullscreen="true" frameborder="0"></iframe>
+    <iframe ref="ifr" :src="`scene.html?rnd=${rnd}${view}&m=${scene}`" allowfullscreen="true" frameborder="0"></iframe>
+    <!-- scene.html?m=1079&firstView=pano:207,qua:0.0028560994705540276, 0.9366390248430625, -0.007638851405218204, 0.3502011027682601 -->
   </div>
 </template>
 
@@ -19,6 +20,9 @@ export default {
       },'*');
       this.$bus.$emit('changeTheme',newVal)
     },
+    scene(){
+      this.rnd = Math.random()
+    },
     showWelcome(newVal){
       if(!newVal){
           this.$refs.ifr.contentWindow.postMessage({
@@ -33,7 +37,9 @@ export default {
       showWelcome:true,
       bfing: false,
       scene:'xinjiangout',
-      canjump:false
+      canjump:false,
+      view:"",
+      rnd:Math.random()
     }
   },
 
@@ -62,12 +68,22 @@ export default {
         if (Object.prototype.toString.call(res.data) == "[object Object]") {
           let data = res.data.data;
           if (res.data.source === "currentScene") {
-           this.scene = data
-           this.$bus.$emit('activeScene',data)
+            if (data.pano) {
+              let {x,y,z,w} = data.quat
+              this.view = `&firstView=pano:${data.pano},qua:${x+', '+y+', '+z+', '+w}`
+            }
+           this.scene = data.id
+           this.$bus.$emit('activeScene',data.id)
+           this.$showLoading()
           }
 
           if (res.data.source === "canJump") {
-           this.canjump = true
+            this.canjump = true
+            this.$hideLoading()
+          }
+
+          if (res.data.source === "reLoadPage") {
+             this.$refs.ifr.contentWindow.location.reload()
           }
         }
       });

+ 22 - 11
web/src/views/scene/scene.vue

@@ -139,22 +139,29 @@ export default {
         }
 
         if (res.data.source === "userInfo") {
-          console.log(res.data.data);
           this.$store.dispatch("setUserInfo", res.data.data);
         }
       }
     });
 
     this.$nextTick(() => {
-      this.$showLoading()
+        this.TO && clearInterval(this.TO)
+        this.TO = setInterval(() => {
+          window.parent.postMessage(
+            {
+              source: "reLoadPage",
+              data: true,
+            },
+            "*"
+          );
+      }, 3 * 1000);
 
       if (!window.evt) {
         window.evt = document.createEvent("HTMLEvents");
         window.evt.initEvent("loadfinish", false, false);
       }
       window.addEventListener("loadfinish", () => {
-        this.$hideLoading()
-
+        this.TO && clearInterval(this.TO)
         window.parent.postMessage(
             {
               source: "canJump",
@@ -167,7 +174,9 @@ export default {
           window.parent.postMessage(
             {
               source: "currentScene",
-              data: data.content,
+              data: {
+                id:data.content
+              },
             },
             "*"
           );
@@ -202,13 +211,14 @@ export default {
 
     this.$bus.$on("currentScene", (data) => {
       window.parent.postMessage(
-            {
-              source: "currentScene",
-              data: data,
-            },
-            "*"
-          );
+        {
+          source: "currentScene",
+          data: data,
+        },
+        "*"
+      );
     });
+
     this.getUserInfo();
     this.getData();
   },
@@ -281,6 +291,7 @@ export default {
       BgmUrl:'',
       danmu: [],
       cp: "",
+      TO:null
     };
   },
 };