Browse Source

fix search

scorpio 2 years ago
parent
commit
149337fe96
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/page/login.vue

+ 1 - 1
src/page/login.vue

@@ -388,7 +388,7 @@ export default {
       this.$api.common.getMenus().then(res => {
       this.$api.common.getMenus().then(res => {
         if (res.code === 200 && res.data.length > 0) {
         if (res.code === 200 && res.data.length > 0) {
           const first = res.data[0]
           const first = res.data[0]
-          if (first.children.length > 0) {
+          if (first.children && first.children.length > 0) {
             this.$router.replace(first.children[0].path)
             this.$router.replace(first.children[0].path)
             localStorage.setItem(
             localStorage.setItem(
               'data-type',
               'data-type',