panxiandiao_i 5 years ago
parent
commit
a4ab622a40
2 changed files with 6 additions and 6 deletions
  1. 1 1
      src/layout/components/Sidebar/index.vue
  2. 5 5
      src/views/home/index.vue

+ 1 - 1
src/layout/components/Sidebar/index.vue

@@ -67,7 +67,7 @@ export default {
     }
   },
   mounted() {
-    // this.getGlobalInterface()
+    this.getGlobalInterface()
   },
   methods: {
     handleSelect(key, keypath) {

+ 5 - 5
src/views/home/index.vue

@@ -273,7 +273,7 @@ img.img-arrow {
 
 <script>
 import FloatMenu from './floatMenu'
-// import { getGlobalInterface } from '@/api/data.js'
+import { getGlobalInterface } from '@/api/data.js'
 
 export default {
   components: {
@@ -304,10 +304,10 @@ export default {
         }
       })()
     }
-    // getGlobalInterface().then(res => {
-    //   this.$store.dispatch('data/setMenu', res.data)
-    //   this.$store.dispatch('data/setSubMenu', res.data[0].subMenus[0])
-    // })
+    getGlobalInterface().then(res => {
+      this.$store.dispatch('data/setMenu', res.data)
+      this.$store.dispatch('data/setSubMenu', res.data[0].subMenus[0])
+    })
   },
   methods: {
     handleSelect(key, keyPath) {