From a482e23ae27b65c63e50e730d22397bc85fd481c Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 07 二月 2024 22:39:45 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/App.jsx | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/zy-asrs-flow/src/App.jsx b/zy-asrs-flow/src/App.jsx
index 1df3a28..79b7cc6 100644
--- a/zy-asrs-flow/src/App.jsx
+++ b/zy-asrs-flow/src/App.jsx
@@ -28,7 +28,14 @@
export async function patchClientRoutes({ routes }) {
patchRouteWithRemoteMenus(routes);
-};
+}
+
+export async function onRouteChange({ clientRoutes, location }) {
+ const menus = getRemoteMenu();
+ if (menus === null && location.pathname !== loginPath) {
+ history.go(0);
+ }
+}
/**
* @see https://umijs.org/zh-CN/plugins/plugin-initial-state
--
Gitblit v1.9.1