shaogen1995 4 лет назад
Родитель
Сommit
c068cb961b

+ 20 - 18
web/public/static/js/loadCAD.js

@@ -199,21 +199,23 @@ window.grendCAD = (function grendCAD() {
   }
 })();
 
-
-$.ajax({
-  url: g_Prefix + "data/" + window.number + "/someData.json" + "?" + Date.now(),
-  method: 'GET',
-  success(data) {
-    if (!data.showCad) return
-
-
-    
-    $.ajax({
-      url: '//super.4dage.com/data/'+ window.number +'/floor.json', 
-      method: 'GET',
-      success(res) {
-        grendCAD(res, document.documentElement, data.cadSignColor, data.cadBorderColor, data.cadBorderWidth)
-      }
-    })
-  }
-})
+console.log(1111111111111111111,window.number);
+if(window.number==='1151'){
+  $.ajax({
+    url: g_Prefix + "data/" + window.number + "/someData.json" + "?" + Date.now(),
+    method: 'GET',
+    success(data) {
+      if (!data.showCad) return
+  
+  
+      
+      $.ajax({
+        url: '//super.4dage.com/data/'+ window.number +'/floor.json', 
+        method: 'GET',
+        success(res) {
+          grendCAD(res, document.documentElement, data.cadSignColor, data.cadBorderColor, data.cadBorderWidth)
+        }
+      })
+    }
+  })
+}

Разница между файлами не показана из-за своего большого размера
+ 57 - 53
web/public/static/js/main_2020_show.js


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

@@ -155,7 +155,7 @@ export default {
     //点击跳转
     jump(url) {
       if (url === "tab1") return;
-      this.$router.push(url).catch(() => {});
+      this.$router.replace(url).catch(() => {});
       this.$nextTick(() => {
         setTimeout(() => {
           location.reload(true);

+ 5 - 0
web/src/router/index.js

@@ -53,4 +53,9 @@ const router = new VueRouter({
   routes
 })
 
+// router.beforeEach((to, from, next) => {
+//   if(to.fullPath==='/'||from.fullPath==='/')
+//   console.log(9899, to, from)
+//   next()
+// })
 export default router

+ 25 - 31
web/src/views/home/index.vue

@@ -1,18 +1,16 @@
 <template>
-<div class='home'>
-  <div class="btnR" @click="goIndex">立即进入</div>
-</div>
+  <div class="home">
+    <div class="btnR" @click="goIndex">立即进入</div>
+  </div>
 </template>
 
 <script>
 export default {
-  name: 'home',
+  name: "home",
   components: {},
-  data () {
+  data() {
     // 这里存放数据
-    return {
-
-    }
+    return {};
   },
   // 监听属性 类似于data概念
   computed: {},
@@ -20,40 +18,36 @@ export default {
   watch: {},
   // 方法集合
   methods: {
-    goIndex(){
-      this.$router.push('/index?m=1151')
-      this.$nextTick(()=>{
+    goIndex() {
+      this.$router.replace("/index?m=1151");
+      this.$nextTick(() => {
         setTimeout(() => {
-          location.reload(true)
+          location.reload(true);
         }, 100);
-      })
-    }
+      });
+    },
   },
   // 生命周期 - 创建完成(可以访问当前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>
-.home{
+.home {
   position: relative;
   width: 100%;
   height: 100%;
-  background: url('../../assets/img/indexBac.png');
+  background: url("../../assets/img/indexBac.png");
   background-size: 100% 100%;
-  .btnR{
+  .btnR {
     font-size: 20px;
     border-radius: 8px;
     cursor: pointer;

+ 1 - 1
web/src/views/layout/index.vue

@@ -60,7 +60,7 @@ export default {
     // 点击左侧tab栏
     jump(url) {
       if (url === "tab1") url = "/index?m=1151";
-      this.$router.push(url).catch(() => {});
+      this.$router.replace(url).catch(() => {});
       if (url === "/index?m=1151") {
         this.$nextTick(() => {
           setTimeout(() => {

+ 0 - 2
web/src/views/tab3/index.vue

@@ -227,14 +227,12 @@ export default {
             // 左按钮
             const tempLeft = document.querySelector(".el-image-viewer__prev");
             tempLeft.addEventListener("click", () => {
-              console.log(99811111);
               this.imgBigNum--;
               if (this.imgBigNum === 0) this.imgBigNum = this.srcList.length;
             });
             // 右按钮
             const tempRight = document.querySelector(".el-image-viewer__next");
             tempRight.addEventListener("click", () => {
-              console.log(99822222222);
               this.imgBigNum++;
               if (this.imgBigNum === this.srcList.length + 1)
                 this.imgBigNum = 1;