登录页面处理error参数

This commit is contained in:
mtvpls
2026-02-07 11:50:03 +08:00
parent 2d5aa76f5d
commit 0eebbf6cb9

View File

@@ -85,6 +85,14 @@ function LoginPageClient() {
const { siteName } = useSite();
// 处理URL中的error参数
useEffect(() => {
const errorParam = searchParams.get('error');
if (errorParam) {
setError(decodeURIComponent(errorParam));
}
}, [searchParams]);
// 在客户端挂载后设置配置
useEffect(() => {
if (typeof window !== 'undefined') {