From 1e06a9f9cf8c2c43121d3e40ebaa1ffc17d3ee79 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Sat, 19 Apr 2025 22:35:33 +0800
Subject: [PATCH] feat: 添加重定向

---
 src/page/index/index.vue |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/page/index/index.vue b/src/page/index/index.vue
index 72fef7f..8e3e300 100644
--- a/src/page/index/index.vue
+++ b/src/page/index/index.vue
@@ -76,6 +76,11 @@
       this.$store.dispatch('GetMenu', item.id).then(data => {
         if (data.length !== 0) {
           this.$router.$avueRouter.formatRoutes(data, true);
+          const redirect = decodeURIComponent(to.query.redirect || '');
+          if (redirect){
+            console.log('redirect',redirect);
+            this.$router.push({ path: redirect})
+          }
         }
         //当点击顶部菜单后默认打开第一个菜单
         /*if (!this.validatenull(item)) {

--
Gitblit v1.9.3