更新juliang_callback接口
This commit is contained in:
+12
-12
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -28,7 +28,7 @@
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<script type="module" crossorigin src="/assets/index-CeDXrP7R.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-Du_aYgTx.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-eLRg4pQk.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -11,6 +11,7 @@ const AuthorizationWaitingPage: React.FC = () => {
|
||||
const [countdown, setCountdown] = useState(0);
|
||||
const [isChecking, setIsChecking] = useState(true);
|
||||
const [authSuccess, setAuthSuccess] = useState(false);
|
||||
const [authError, setAuthError] = useState('');
|
||||
|
||||
useEffect(() => {
|
||||
const authCode = searchParams.get('auth_code');
|
||||
@@ -40,8 +41,11 @@ const AuthorizationWaitingPage: React.FC = () => {
|
||||
setTimeout(() => {
|
||||
navigate('/authorization');
|
||||
}, 1500);
|
||||
} catch (error) {
|
||||
console.log('授权回调失败,开始轮询检查...');
|
||||
} catch (error: any) {
|
||||
const errorMsg = error?.message || '授权失败';
|
||||
setAuthError(errorMsg);
|
||||
setIsChecking(false);
|
||||
message.error(errorMsg);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -83,6 +87,7 @@ const AuthorizationWaitingPage: React.FC = () => {
|
||||
setCountdown(0);
|
||||
setIsChecking(true);
|
||||
setAuthSuccess(false);
|
||||
setAuthError('');
|
||||
window.location.href = '/authorization';
|
||||
};
|
||||
|
||||
@@ -111,7 +116,27 @@ const AuthorizationWaitingPage: React.FC = () => {
|
||||
)}
|
||||
</div>
|
||||
|
||||
{countdown >= 10 ? (
|
||||
{authError ? (
|
||||
<>
|
||||
<Typography.Title level={3} style={{ marginBottom: 16, color: '#ef4444' }}>授权失败</Typography.Title>
|
||||
<Typography.Text style={{ color: '#64748b', marginBottom: 24, display: 'block' }}>{authError}</Typography.Text>
|
||||
<Button
|
||||
type="primary"
|
||||
size="large"
|
||||
icon={<ReloadOutlined />}
|
||||
onClick={handleRetry}
|
||||
style={{
|
||||
borderRadius: 8,
|
||||
background: 'linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)',
|
||||
border: 'none',
|
||||
fontWeight: 600,
|
||||
padding: '12px 32px',
|
||||
}}
|
||||
>
|
||||
重新授权
|
||||
</Button>
|
||||
</>
|
||||
) : countdown >= 10 ? (
|
||||
<>
|
||||
<Typography.Title level={3} style={{ marginBottom: 16, color: '#ef4444' }}>授权无响应</Typography.Title>
|
||||
<Typography.Text style={{ color: '#64748b', marginBottom: 24, display: 'block' }}>请重新授权</Typography.Text>
|
||||
|
||||
Reference in New Issue
Block a user