feat:黄炎培对话对接中

This commit is contained in:
zhongyidian committed 2026-01-07 21:08:38 +08:00
1 parent 3611a0857a
commit 6ab184b328
125 files changed
+6617 -2391

No files matched your search

+24 -18
View File
@@ -7,30 +7,33 @@ import { useState } from "react";
const starName = "luxun";
// 展品 ID 与资源路径映射
const exhibitSrcMap: Record<1 | 2, string> = {
1: "luxun/place4/展品9_t",
2: "luxun/place4/展品9_b",
const exhibitSrcMap: Record<1 | 2 | 3, string> = {
1: "luxun/place4/展品11",
2: "luxun/place4/展品12",
3: "luxun/place4/展品13",
};
const LuxunPlace4 = () => {
const LuxunPlace5 = () => {
const navigate = useNavigate();
const { moduleName } = useParams<{
moduleName: string;
}>();
const [activeExhibitId, setActiveExhibitId] = useState<1 | 2 | null>(null);
const [activeExhibitId, setActiveExhibitId] = useState<1 | 2 | 3 | null>(
null
);
const [visited, setVisited] = useState<Set<number>>(new Set());
const handleOpenExhibit = (index: 1 | 2) => {
const handleOpenExhibit = (index: 1 | 2 | 3) => {
setActiveExhibitId(index);
};
const progressCount = visited.size;
const total = 2;
const total = 3;
const completed = progressCount >= total;
const subtitle = completed
? "探索二楼卧室兼书房的书桌(已完成)"
: `探索二楼卧室兼书房的书桌(${progressCount}/${total})`;
? "探索鲁迅故居的客房(已完成)"
: `探索鲁迅故居的客房(${progressCount}/${total})`;
const subtitleClassName = completed
? "text-[#fff998] [text-shadow:_0_8px_8px_rgba(0,0,0,0.35),_0_0_16px_rgba(0,0,0,0.25)]"
: undefined;
@@ -43,7 +46,7 @@ const LuxunPlace4 = () => {
}}
>
<Title
title="为亡友编纂的精神丰碑"
title="6平方米的红色庇护所"
subtitle={subtitle}
subtitleClassName={subtitleClassName}
className="absolute top-10 left-1/2 -translate-x-1/2"
@@ -62,25 +65,28 @@ const LuxunPlace4 = () => {
{/* 展品 */}
<Cursor
className="absolute left-170 bottom-115"
size={0.4}
className="absolute left-167 bottom-30"
onClick={() => handleOpenExhibit(1)}
read={visited.has(1)}
/>
<Cursor
className="absolute left-183 bottom-115"
size={0.4}
className="absolute left-228 bottom-30"
onClick={() => handleOpenExhibit(2)}
read={visited.has(2)}
/>
<Cursor
className="absolute right-115 bottom-18 z-20"
onClick={() => handleOpenExhibit(3)}
read={visited.has(3)}
/>
{completed && (
<Image
className="absolute bottom-0 right-120"
src={getStaticImage("luxun/place4/前进")}
className="absolute bottom-0 right-0"
src={getStaticImage("luxun/place4/离开")}
button
onClick={() => {
navigate(`/${moduleName}/${starName}/place5`);
navigate(`/${moduleName}/${starName}/home`);
}}
/>
)}
@@ -103,4 +109,4 @@ const LuxunPlace4 = () => {
);
};
export default LuxunPlace4;
export default LuxunPlace5;