|
|
@@ -56,8 +56,12 @@ const Redirect: React.FC = () => {
|
|
|
setUserConfig(null); // 清除用户信息
|
|
|
}
|
|
|
|
|
|
- // 跳转到指定路由
|
|
|
- navigate(redirectPath || '/home', { replace: true });
|
|
|
+ // 跳转到指定路由,外部链接使用 window.location
|
|
|
+ if (redirectPath?.startsWith('http')) {
|
|
|
+ window.location.replace(redirectPath);
|
|
|
+ } else {
|
|
|
+ navigate(redirectPath || '/home', { replace: true });
|
|
|
+ }
|
|
|
} catch (error) {
|
|
|
console.error('处理重定向参数失败:', error);
|
|
|
// 出错时跳转到 home 页
|