shaogen1995 пре 4 година
родитељ
комит
0ac40c1ff1
3 измењених фајлова са 12 додато и 4 уклоњено
  1. 5 1
      src/components/tabLeft.vue
  2. 5 1
      src/components/tabLeft2.vue
  3. 2 2
      src/utils/request.js

+ 5 - 1
src/components/tabLeft.vue

@@ -36,7 +36,11 @@ export default {
     skip (index) {
       this.$router.push(`/layout/holding${index}`).catch(() => {})
       // 如果从别的tab栏点击藏品总账,就自动刷新页面获取最新信息
-      if (this.ind !== index && index === 3) location.reload(true)
+      this.$nextTick(() => {
+        setTimeout(() => {
+          if (this.ind !== index && index === 3) location.reload(true)
+        }, 100)
+      })
     }
   }
 }

+ 5 - 1
src/components/tabLeft2.vue

@@ -33,7 +33,11 @@ export default {
     skip (index) {
       this.$router.push(`/layout/collect${index}`).catch(() => {})
       // 如果从别的tab栏点击藏品总账,就自动刷新页面获取最新信息
-      if (this.ind !== index && index === 0) location.reload(true)
+      this.$nextTick(() => {
+        setTimeout(() => {
+          if (this.ind !== index && index === 0) location.reload(true)
+        }, 100)
+      })
     }
   }
 }

+ 2 - 2
src/utils/request.js

@@ -1,8 +1,8 @@
 import axios from 'axios'
 // export const baseURL = '666初始地址'
 const service = axios.create({
-  baseURL: 'http://192.168.0.135:8006',
-  // baseURL: '',
+  // baseURL: 'http://192.168.0.135:8006',
+  baseURL: '',
   timeout: 5000
 })