更新导航路径,修复确认按钮逻辑

This commit is contained in:
yuchenglong
2025-11-21 16:15:03 +08:00
parent b954b927db
commit 137bf13ae5
2 changed files with 5 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ const U4: React.FC = () => {
const navigate = useNavigate(); const navigate = useNavigate();
const [test, setTest] = React.useState<testType[]>([]); const [test, setTest] = React.useState<testType[]>([]);
const handleConfirm = () => { const handleConfirm = () => {
navigate("/u5"); navigate("/UI6");
}; };
React.useEffect(() => { React.useEffect(() => {
setTest([ setTest([

View File

@@ -160,7 +160,8 @@ const UI6: React.FC = () => {
const handleConfirm = () => { const handleConfirm = () => {
const canvas = canvasRef.current; const canvas = canvasRef.current;
if (!canvas) { if (!canvas) {
navigate("/UI7"); // navigate("/UI7");
alert("签名不能为空,请签名后再提交");
return; return;
} }
@@ -178,7 +179,7 @@ const UI6: React.FC = () => {
URL.revokeObjectURL(url); URL.revokeObjectURL(url);
}, "image/png"); }, "image/png");
navigate("/UI7"); navigate("/UI8");
}; };
return ( return (
@@ -270,7 +271,7 @@ const UI6: React.FC = () => {
<div className="basic-confirm-section"> <div className="basic-confirm-section">
<BackButton text="返回" onClick={handleBack} /> <BackButton text="返回" onClick={handleBack} />
{showWaitButton ? ( {showWaitButton ? (
<WaitButton text={`等待(${countdown})S`} onClick={handleConfirm} /> <WaitButton text={`等待(${countdown})S`} />
) : ( ) : (
<ConfirmButton text="提交" onClick={handleConfirm} /> <ConfirmButton text="提交" onClick={handleConfirm} />
)} )}