lanxin 9 месяцев назад
Родитель
Сommit
11755cd382
5 измененных файлов с 9491 добавлено и 136 удалено
  1. 45 55
      webM/src/pages/Home.vue
  2. 8 8
      webM/src/router/index.js
  3. 1 1
      webM/src/utils/request.js
  4. 39 72
      webM/src/views/layout/index.vue
  5. 9398 0
      webM/yarn.lock

+ 45 - 55
webM/src/pages/Home.vue

@@ -8,28 +8,21 @@
     <div id="gui-thumb"></div>
 
     <!-- 左侧固定导航栏 -->
-    <div
-      class="all"
-      :class="{ activeAll: cutTab }"
-      @click="cutTab = !cutTab"
-    ></div>
-     <div class="tab" :class="{ active: cutTab }" v-show="cutTab">
-      <div
-        class="small small1"
-        @click="jump('tab1')"
-      >
+    <div class="all" :class="{ activeAll: cutTab }" @click="cutTab = !cutTab"></div>
+    <div class="tab" :class="{ active: cutTab }" v-show="cutTab">
+      <div class="small small1" @click="jump('tab1')">
         <img src='../assets/imgM/tab1Ac.png' alt="" />
         <p>数字史馆</p>
       </div>
-      <div class="small small2" @click="jump('tab2')">
+      <!-- <div class="small small2" @click="jump('tab2')">
         <img src='../assets/imgM/tab2.png' alt="" />
         <p>校园全景</p>
-      </div>
-      <div class="small small3" @click="jump('tab3')">
+      </div> -->
+      <div class="small small3" @click="jump('tab2')">
         <img src='../assets/imgM/tab3.png' alt="" />
         <p>文物典藏</p>
       </div>
-      <div class="small small4" @click="jump('tab4')">
+      <div class="small small4" @click="jump('tab3')">
         <img src='../assets/imgM/tab4.png' alt="" />
         <p>信息检索</p>
       </div>
@@ -60,9 +53,7 @@
         <v-guide />
 
         <!-- logo -->
-        <div
-          id="myCompany"
-          style="
+        <div id="myCompany" style="
             width: 100%;
             position: absolute;
             bottom: 0px;
@@ -71,8 +62,7 @@
             font-family: '微软雅黑';
             font-weight: 580;
             color: rgba(255, 255, 255, 0.8);
-          "
-        >
+          ">
           <!-- 四维时代提供技术支持 -->
         </div>
       </div>
@@ -105,18 +95,18 @@
 </template>
 
 <script>
-import exhibition from "@/components/exhibition";
-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 exhibition from "@/components/exhibition"
+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"
 
 export default {
   name: "Home",
@@ -137,29 +127,29 @@ export default {
 
   data() {
     return {
-            cutTab: false,
+      cutTab: false,
 
       showWelcome: true,
       hotspots: "",
       loading: true,
-    };
+    }
   },
 
   methods: {
     //点击跳转
     jump(url) {
-      if (url === "tab1") return;
-      this.cutTab=false
-      this.$router.replace(url).catch(() => {});
+      if (url === "tab1") return
+      this.cutTab = false
+      this.$router.replace(url).catch(() => { })
       this.$nextTick(() => {
         setTimeout(() => {
-          location.reload(true);
-        }, 300);
-      });
+          location.reload(true)
+        }, 300)
+      })
     },
     hideWelcome() {
-      this.showWelcome = false;
-      window.manage.switchBgmState(true);
+      this.showWelcome = false
+      window.manage.switchBgmState(true)
     },
     getHotSpotList() {
       $.ajax({
@@ -174,33 +164,33 @@ export default {
         dataType: "json",
         contentType: "application/json",
         success: (result) => {
-          this.hotspots = result;
+          this.hotspots = result
         },
-      });
+      })
     },
   },
 
   mounted() {
     this.$nextTick(() => {
-      window.evt = document.createEvent("HTMLEvents");
-      window.evt.initEvent("loadfinish", false, false);
+      window.evt = document.createEvent("HTMLEvents")
+      window.evt.initEvent("loadfinish", false, false)
       window.addEventListener("loadfinish", () => {
-        this.loading = false;
-        document.title = "中国人民解放军陆军勤务学院";
-        this.getHotSpotList();
+        this.loading = false
+        document.title = "中国人民解放军陆军勤务学院"
+        this.getHotSpotList()
         window.player.on("openTips", () => {
-          this.$showTips();
-        });
+          this.$showTips()
+        })
 
         window.player.on("openHotspot", (data) => {
           this.$showHotspot({
             hotspot: this.hotspots[data],
-          });
-        });
-      });
-    });
+          })
+        })
+      })
+    })
   },
-};
+}
 </script>
 
 <style lang="less" scoped>

+ 8 - 8
webM/src/router/index.js

@@ -26,21 +26,21 @@ const routes = [
         name: 'home',
         component: () => import('../views/home/index.vue')
       },
+      // {
+      //   path: 'tab2',
+      //   name: 'tab2',
+      //   meta: { myInd: 2 },
+      //   component: () => import('../views/tab2/index.vue')
+      // },
       {
         path: 'tab2',
         name: 'tab2',
-        meta: { myInd: 2 },
-        component: () => import('../views/tab2/index.vue')
-      },
-      {
-        path: 'tab3',
-        name: 'tab3',
         meta: { myInd: 3 },
         component: () => import('../views/tab3/index.vue')
       },
       {
-        path: 'tab4',
-        name: 'tab4',
+        path: 'tab3',
+        name: 'tab3',
         meta: { myInd: 4 },
         component: () => import('../views/tab4/index.vue')
       }

+ 1 - 1
webM/src/utils/request.js

@@ -1,7 +1,7 @@
 import axios from 'axios'
 const service = axios.create({
   // baseURL: 'http://192.168.0.135:8005/', // 本地调试
-  // baseURL: 'http://192.168.0.245:8005/', // 线上调试
+  // baseURL: 'http://192.168.20.245:8005/', // 线上调试
   baseURL: '', // build
   timeout: 5000
 })

+ 39 - 72
webM/src/views/layout/index.vue

@@ -1,29 +1,15 @@
 <template>
   <div class="layout">
     <!-- tab -->
-    <div
-      class="all"
-       v-show="$route.meta.myInd"
-      :class="{ activeAll: cutTab }"
-      @click="cutTab = !cutTab"
-    ></div>
+    <div class="all" v-show="$route.meta.myInd" :class="{ activeAll: cutTab }" @click="cutTab = !cutTab"></div>
     <div class="tab" :class="{ active: cutTab }" v-show="cutTab">
-      <div
-        class="small small1"
-        :class="{ activeSmall: $route.meta.myInd === 1 }"
-        @click="jump('tab1')"
-      >
-        <img
-          :src="
-            require(`@/assets/imgM/${
-              $route.meta.myInd === 1 ? 'tab1Ac' : 'tab1'
-            }.png`)
-          "
-          alt=""
-        />
+      <div class="small small1" :class="{ activeSmall: $route.meta.myInd === 1 }" @click="jump('tab1')">
+        <img :src="require(`@/assets/imgM/${$route.meta.myInd === 1 ? 'tab1Ac' : 'tab1'
+          }.png`)
+          " alt="" />
         <p>数字史馆</p>
       </div>
-      <div
+      <!-- <div
         class="small small2"
         :class="{ activeSmall: $route.meta.myInd === 2 }"
         @click="jump('tab2')"
@@ -37,40 +23,22 @@
           alt=""
         />
         <p>校园全景</p>
-      </div>
-      <div
-        class="small small3"
-        :class="{ activeSmall: $route.meta.myInd === 3 }"
-        @click="jump('tab3')"
-      >
-        <img
-          :src="
-            require(`@/assets/imgM/${
-              $route.meta.myInd === 3 ? 'tab3Ac' : 'tab3'
-            }.png`)
-          "
-          alt=""
-        />
+      </div> -->
+      <div class="small small3" :class="{ activeSmall: $route.meta.myInd === 3 }" @click="jump('tab2')">
+        <img :src="require(`@/assets/imgM/${$route.meta.myInd === 3 ? 'tab3Ac' : 'tab3'
+          }.png`)
+          " alt="" />
         <p>文物典藏</p>
       </div>
-      <div
-        class="small small4"
-        :class="{ activeSmall: $route.meta.myInd === 4 }"
-        @click="jump('tab4')"
-      >
-        <img
-          :src="
-            require(`@/assets/imgM/${
-              $route.meta.myInd === 4 ? 'tab4Ac' : 'tab4'
-            }.png`)
-          "
-          alt=""
-        />
+      <div class="small small4" :class="{ activeSmall: $route.meta.myInd === 4 }" @click="jump('tab3')">
+        <img :src="require(`@/assets/imgM/${$route.meta.myInd === 4 ? 'tab4Ac' : 'tab4'
+          }.png`)
+          " alt="" />
         <p>信息检索</p>
       </div>
     </div>
     <!-- 切换的组件页面 -->
-    <Router-view/>
+    <Router-view />
   </div>
 </template>
 
@@ -85,7 +53,7 @@ export default {
     //这里存放数据
     return {
       cutTab: false,
-    };
+    }
   },
   //监听属性 类似于data概念
   computed: {},
@@ -95,30 +63,30 @@ export default {
   methods: {
     // 点击tab栏
     jump(url) {
-      this.cutTab=false
-      if (url === "tab1") url = "/index?m=TEST";
-      this.$router.replace(url).catch(() => {});
+      this.cutTab = false
+      if (url === "tab1") url = "/index?m=TEST"
+      this.$router.replace(url).catch(() => { })
       if (url === "/index?m=TEST") {
         this.$nextTick(() => {
           setTimeout(() => {
-            location.reload(true);
-          }, 300);
-        });
+            location.reload(true)
+          }, 300)
+        })
       }
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
-  created() {},
+  created() { },
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {},
-  beforeCreate() {}, //生命周期 - 创建之前
-  beforeMount() {}, //生命周期 - 挂载之前
-  beforeUpdate() {}, //生命周期 - 更新之前
-  updated() {}, //生命周期 - 更新之后
-  beforeDestroy() {}, //生命周期 - 销毁之前
-  destroyed() {}, //生命周期 - 销毁完成
-  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
-};
+  mounted() { },
+  beforeCreate() { }, //生命周期 - 创建之前
+  beforeMount() { }, //生命周期 - 挂载之前
+  beforeUpdate() { }, //生命周期 - 更新之前
+  updated() { }, //生命周期 - 更新之后
+  beforeDestroy() { }, //生命周期 - 销毁之前
+  destroyed() { }, //生命周期 - 销毁完成
+  activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
+}
 </script>
 <style lang='less' scoped>
 .layout {
@@ -156,7 +124,7 @@ export default {
     width: 60px;
     height: 50px;
     position: absolute;
-    bottom: 52px;
+    bottom: 56px;
     left: 16px;
     color: #fff;
     font-size: 14px;
@@ -178,12 +146,12 @@ export default {
     left: 8px;
   }
   .small3 {
-    bottom: 136px;
-    left: 43px;
+    bottom: 119px;
+    left: 24px;
   }
   .small4 {
-    bottom: 144px;
-    left: 93px;
+    bottom: 136px;
+    left: 90px;
   }
   .activeSmall {
     color: #b92e2e;
@@ -212,5 +180,4 @@ export default {
   }
   background-color: rgba(194, 181, 162, 0.8);
 }
-//@import url(); 引入公共css类
-</style>
+//@import url(); 引入公共css类</style>

Разница между файлами не показана из-за своего большого размера
+ 9398 - 0
webM/yarn.lock