无人机管理后台前端(已迁走)
罗广辉
2025-04-19 26616c21ce078f3475cc924fc10551febc887f61
feat: 添加重定向
1 files modified
5 ■■■■■ changed files
src/page/index/index.vue 5 ●●●●● patch | view | raw | blame | history
src/page/index/index.vue
@@ -77,12 +77,13 @@
        if (data.length !== 0) {
          this.$router.$avueRouter.formatRoutes(data, true)
          // 获取url里面的redirect
          const redirect = decodeURIComponent(this.$route.query.redirect || '');
          if (redirect){
            console.log('redirect',redirect);
            this.$router.push({ path: redirect})
            const [path, queryString] = redirect.split('?');
            const query = queryString ? Object.fromEntries(new URLSearchParams(queryString)) : {};
            this.$router.push({ path,query})
          }
        }
        //当点击顶部菜单后默认打开第一个菜单