4 天以前 b9b476d4b4f1bf9e08b58249fb42f7b07aa3a0fa
src/router/guard.ts
@@ -60,8 +60,7 @@
      if (to.path === LOGIN_PATH && accessStore.accessToken) {
        return decodeURIComponent(
          (to.query?.redirect as string) ||
            userStore.userInfo?.homePath ||
            preferences.app.defaultHomePath,
            '/analytics',
        );
      }
      return true;
@@ -132,7 +131,7 @@
    userStore.setUserRoles(userRoles);
    const redirectPath = (from.query.redirect ??
      (to.path === preferences.app.defaultHomePath
        ? userInfo?.homePath || preferences.app.defaultHomePath
        ? '/analytics'
        : to.fullPath)) as string;
    return {