feat:鲁迅添加引导

This commit is contained in:
zhongyidian committed 2026-01-08 18:41:24 +08:00
1 parent e8dc5d4b95
commit 3129e01257
26 files changed
+951 -86

No files matched your search

+20 -1
View File
@@ -9,6 +9,7 @@ import {
GuideStepsItem,
SingleChoiceQuizPanel,
} from "@/components";
import { SuccessAlert } from "@/components/layout";
import { getBackgroundImage, getStaticImage } from "@/lib/utils";
import { useNavigate, useParams } from "react-router-dom";
@@ -38,6 +39,8 @@ const HuangyanpeiPlace3 = () => {
const [guide3Step, setGuide3Step] = useState(0);
// 光标3的题目显示状态
const [showQuiz3, setShowQuiz3] = useState(false);
// 成功提示状态
const [showSuccessAlert, setShowSuccessAlert] = useState(false);
// 光标1、2的引导对话状态(在两者都浏览后显示)
const [guide12Visible, setGuide12Visible] = useState(false);
@@ -69,7 +72,7 @@ const HuangyanpeiPlace3 = () => {
const handleQuiz3Submit = (value: string, isCorrect: boolean) => {
if (isCorrect) {
setShowQuiz3(false);
setVisited((prev) => prev.add(3));
setShowSuccessAlert(true);
}
};
@@ -212,6 +215,22 @@ const HuangyanpeiPlace3 = () => {
onSubmit={handleQuiz3Submit}
/>
{/* 成功提示 */}
<SuccessAlert
visible={showSuccessAlert}
onContinue={() => {
setShowSuccessAlert(false);
setVisited((prev) => {
const next = new Set(prev);
next.add(3);
return next;
});
}}
onClose={() => {
setShowSuccessAlert(false);
}}
/>
{/* 光标1、2的引导对话 */}
<GuideSteps
visible={guide12Visible}