| src/page/index/index.vue | ●●●●● 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}) } } //当点击顶部菜单后默认打开第一个菜单