feat: 更新场景和组件,优化用户体验
- 更新多个场景中的引导对话,提升学习互动性。 - 修改组件以清理不必要的学习引导弹窗,简化用户流程。 - 调整文本内容,确保信息准确性和一致性。 - 添加背景音乐控制,增强沉浸式体验。
This commit is contained in:
1 parent
d226283e15
commit
71f607f6a3
46 files changed
+423
-372
No files matched your search
@@ -42,7 +42,7 @@ const QUIZ_ANCHORS: QuizAnchor[] = [
|
||||
id: "quiz-1",
|
||||
time: Math.ceil(5.52 * 60), //5.52分钟
|
||||
title: "题目1",
|
||||
prompt: "陈云经济思想的核心内容指的是( )。",
|
||||
prompt: "陈云经济思想的核心内容指的是(\xa0\xa0\xa0\xa0)。",
|
||||
type: "multiple",
|
||||
options: [
|
||||
{ value: "A", label: "综合平衡", isCorrect: true },
|
||||
@@ -59,7 +59,7 @@ const QUIZ_ANCHORS: QuizAnchor[] = [
|
||||
id: "quiz-2",
|
||||
time: Math.ceil(10.01 * 60),
|
||||
title: "题目2",
|
||||
prompt: "陈云说过以下哪些话能着重体现出他的经济思想。",
|
||||
prompt: "陈云说过以下哪些话能着重体现出他的经济思想?",
|
||||
type: "multiple",
|
||||
options: [
|
||||
{
|
||||
@@ -68,10 +68,10 @@ const QUIZ_ANCHORS: QuizAnchor[] = [
|
||||
isCorrect: true,
|
||||
},
|
||||
{ value: "B", label: "无农不稳,无粮则乱", isCorrect: true },
|
||||
{ value: "C", label: "个人名利淡如水,党的事业重如山。", isCorrect: true },
|
||||
{ value: "C", label: "个人名利淡如水,党的事业重如山", isCorrect: true },
|
||||
{
|
||||
value: "D",
|
||||
label: "领导机关制定政策,要用百分之九十以上的时间作调查研究工作。",
|
||||
label: "领导机关制定政策,要用百分之九十以上的时间作调查研究工作",
|
||||
isCorrect: true,
|
||||
},
|
||||
],
|
||||
@@ -80,19 +80,18 @@ const QUIZ_ANCHORS: QuizAnchor[] = [
|
||||
id: "quiz-3",
|
||||
time: Math.ceil(16.04 * 60),
|
||||
title: "题目3",
|
||||
prompt: "我们新时代的青年可以从陈云同志身上学习到哪些精神",
|
||||
prompt: "新时代的青年可以从陈云身上学习到",
|
||||
type: "drag",
|
||||
options: [
|
||||
{ value: "积极的人生态度", label: "积极的人生态度", isCorrect: true },
|
||||
{ value: "刻苦的学习精神", label: "刻苦的学习精神", isCorrect: true },
|
||||
{ value: "朴素的节俭精神", label: "朴素的节俭精神", isCorrect: true },
|
||||
{ value: "实事求是的精神", label: "实事求是的精神", isCorrect: true },
|
||||
{ value: "积极的人生态度", label: "A.积极的人生态度", isCorrect: true },
|
||||
{ value: "刻苦的学习精神", label: "B.刻苦的学习精神", isCorrect: true },
|
||||
{ value: "朴素的节俭精神", label: "C.朴素的节俭精神", isCorrect: true },
|
||||
{ value: "实事求是的精神", label: "D.实事求是的精神" },
|
||||
],
|
||||
blanks: [
|
||||
{ id: "blank-1", label: "____" },
|
||||
{ id: "blank-2", label: "____" },
|
||||
{ id: "blank-3", label: "____" },
|
||||
{ id: "blank-4", label: "____" },
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -120,11 +119,23 @@ const ChenyunInternalization = () => {
|
||||
const [showLetter, setShowLetter] = useState(false);
|
||||
const [showStudyGuide, setShowStudyGuide] = useState(false);
|
||||
const videoRef = useRef<VideoRef>(null);
|
||||
const audioRef = useRef<HTMLAudioElement | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
setVisible(true);
|
||||
}, []);
|
||||
|
||||
// 组件卸载时清理背景音乐
|
||||
useEffect(() => {
|
||||
const audio = audioRef.current;
|
||||
return () => {
|
||||
if (audio) {
|
||||
audio.pause();
|
||||
audio.currentTime = 0;
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
|
||||
// 视频加载完成后自动播放
|
||||
const handleVideoCanPlay = () => {
|
||||
if (showVideo && videoRef.current) {
|
||||
@@ -179,9 +190,8 @@ const ChenyunInternalization = () => {
|
||||
<DragQuizPanel
|
||||
visible={activeSuccess !== item.id}
|
||||
zIndex={10000}
|
||||
title={`${item.title}(拖拽)`}
|
||||
questionPrefix={`${item.prompt}(`}
|
||||
questionSuffix=")?"
|
||||
questionPrefix={`【拖拽】${item.prompt}`}
|
||||
questionSuffix="等精神。(ABC)"
|
||||
options={item.options.map((opt) => ({
|
||||
value: opt.value,
|
||||
label: opt.label,
|
||||
@@ -232,7 +242,7 @@ const ChenyunInternalization = () => {
|
||||
<MultipleChoiceQuizPanel
|
||||
visible={activeSuccess !== item.id}
|
||||
zIndex={10000}
|
||||
title={`${item.title}(多选题):${item.prompt}`}
|
||||
title={`【多选】${item.prompt}`}
|
||||
options={item.options.map((opt) => ({
|
||||
value: opt.value,
|
||||
label: `${opt.value}. ${opt.label}`,
|
||||
@@ -282,6 +292,7 @@ const ChenyunInternalization = () => {
|
||||
successContent,
|
||||
dragQuizValues,
|
||||
dragQuizErrors,
|
||||
triggerPuzzleAnimation,
|
||||
]
|
||||
);
|
||||
|
||||
@@ -302,6 +313,13 @@ const ChenyunInternalization = () => {
|
||||
onClick={() => navigate(`/${moduleName}/${starName}/home`)}
|
||||
/>
|
||||
|
||||
{/* 内化结束后的背景音乐 */}
|
||||
<audio
|
||||
ref={audioRef}
|
||||
src={getPublicPath("audio/letter/8如愿.m4a")}
|
||||
loop
|
||||
/>
|
||||
|
||||
{showVideo && (
|
||||
<Video
|
||||
ref={videoRef}
|
||||
@@ -314,6 +332,12 @@ const ChenyunInternalization = () => {
|
||||
onEnded={() => {
|
||||
setShowVideo(false);
|
||||
setPostGuideVisible(true);
|
||||
if (audioRef.current) {
|
||||
audioRef.current.currentTime = 0;
|
||||
audioRef.current.play().catch((error) => {
|
||||
console.warn("背景音乐播放失败:", error);
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
@@ -337,7 +361,7 @@ const ChenyunInternalization = () => {
|
||||
他用“全国一盘棋”思路化解危机的案例太震撼了,那你能再跟我讲讲,支撑这些成就的核心经济思想是什么吗?
|
||||
</GuideStepsItem>
|
||||
<GuideStepsItem speaker="guide">
|
||||
针对你的这个问题,今天我们有幸邀请到了中国中共党史学会理事,全国陈云思想生平研究会常务理事兼副秘书长,中共一大纪念馆陈列研究部主任,研究馆员房中老师。关于你的问题,我想房老师会给你指点迷津!...
|
||||
针对你的这个问题,今天我们有幸邀请到了中国中共党史学会理事,全国陈云思想生平研究会常务理事兼副秘书长,中共一大纪念馆陈列研究部主任,研究馆员房中老师。关于你的问题,我想房老师会给你指点迷津!
|
||||
</GuideStepsItem>
|
||||
</GuideSteps>
|
||||
|
||||
@@ -355,13 +379,13 @@ const ChenyunInternalization = () => {
|
||||
zIndex={60}
|
||||
>
|
||||
<GuideStepsItem speaker="student">
|
||||
听完房主任的讲解,从陈云爷爷童年成长的水乡故居,到他主持"银元之战""米棉之战"的史料,再到那台称量粮食的天平、握不住的铅笔头,我真切感受到他"不唯上、不唯书、只唯实"的精神,也懂了他"为老百姓做事"的初心...
|
||||
感谢房老师的讲解!从陈云童年成长的水乡故居,到他主持"银元之战""米棉之战"的史料,再到那台称量粮食的天平、握不住的铅笔头,我真切感受到他"不唯上、不唯书、只唯实"的精神,也懂了他"为老百姓做事"的初心。
|
||||
</GuideStepsItem>
|
||||
<GuideStepsItem speaker="student">
|
||||
这些都让我特别受触动!
|
||||
</GuideStepsItem>
|
||||
<GuideStepsItem speaker="guide">
|
||||
你的感悟很深刻!陈云同志用一生诠释了"务实"和"为人民服务"——从破解沿海地区经济困境,到掌管国家工业化蓝图,再到改革开放时力挺轻纺、钢铁建设支援,每一步都扎根实际、心系百姓。
|
||||
你的感悟很深刻!陈云同志用一生诠释了“务实”与“为民”——从破解边区经济困境,到擘画国家工业化蓝图,再到改革开放时力挺宝钢建设,每一步都扎根实际、心系百姓。
|
||||
</GuideStepsItem>
|
||||
<GuideStepsItem speaker="guide">
|
||||
你不妨把这份触动凝练成几句心里话,既总结参观的收获,也想想未来该如何践行这份精神,用自己的行动传承这份初心吧!
|
||||
@@ -382,6 +406,10 @@ const ChenyunInternalization = () => {
|
||||
<StudyGuideModal
|
||||
visible={showStudyGuide}
|
||||
onContinue={() => {
|
||||
if (audioRef.current) {
|
||||
audioRef.current.pause();
|
||||
audioRef.current.currentTime = 0;
|
||||
}
|
||||
setShowStudyGuide(false);
|
||||
navigate(`/${moduleName}/${starName}/home`);
|
||||
}}
|
||||
|
||||
Reference in new issue
Block a user