|
@@ -40,10 +40,37 @@ const FlipPic = ({ activeIndex }: { activeIndex: number }) => {
|
|
|
}
|
|
|
}, [activeIndex, prevIndex]);
|
|
|
|
|
|
- const title: Record<string, string[]> = {
|
|
|
- pic1: ['元青花四爱图梅瓶', '“太阳人”石刻', '铜钺'],
|
|
|
- pic2: ['《甘绩熙自述》', '起义军占领武昌后制发的出入城门证', '王汉烈士画像'],
|
|
|
- pic3: ['战争年代李先念使用过的怀表', `郭天民1955年荣获的八一、解放、独立一级勋章`, '123']
|
|
|
+ const title: Record<string, { name: string, link: string }[]> = {
|
|
|
+ pic1: [{
|
|
|
+ name: '元青花四爱图梅瓶',
|
|
|
+ link: 'https://4dscene.4dage.com/culturalrelics/HBSBWG-TS/Model2.html?m=hbts01'
|
|
|
+ }, {
|
|
|
+ name: '“太阳人”石刻',
|
|
|
+ link: 'https://4dscene.4dage.com/culturalrelics/HBSBWG-TS/Model2.html?m=hbts02'
|
|
|
+ }, {
|
|
|
+ name: '铜钺',
|
|
|
+ link: 'https://4dscene.4dage.com/culturalrelics/HBSBWG-TS/Model2.html?m=hbts03'
|
|
|
+ }],
|
|
|
+ pic2: [{
|
|
|
+ name: '《甘绩熙自述》',
|
|
|
+ link: 'https://4dscene.4dage.com/culturalrelics/HBSBWG-TS/Model2.html?m=hbts04'
|
|
|
+ }, {
|
|
|
+ name: '起义军占领武昌后制发的出入城门证',
|
|
|
+ link: 'https://4dscene.4dage.com/culturalrelics/HBSBWG-TS/Model2.html?m=hbts05'
|
|
|
+ }, {
|
|
|
+ name: '王汉烈士画像',
|
|
|
+ link: 'https://4dscene.4dage.com/culturalrelics/HBSBWG-TS/Model2.html?m=hbts06'
|
|
|
+ }],
|
|
|
+ pic3: [{
|
|
|
+ name: '战争年代李先念使用过的怀表',
|
|
|
+ link: 'https://4dscene.4dage.com/culturalrelics/HBSBWG-TS/Model2.html?m=hbts07'
|
|
|
+ }, {
|
|
|
+ name: '郭天民1955年荣获的八一、解放、独立一级勋章',
|
|
|
+ link: 'https://4dscene.4dage.com/culturalrelics/HBSBWG-TS/Model2.html?m=hbts08'
|
|
|
+ }, {
|
|
|
+ name: '123',
|
|
|
+ link: 'https://4dscene.4dage.com/culturalrelics/HBSBWG-TS/Model2.html?m=hbts09'
|
|
|
+ }],
|
|
|
}
|
|
|
|
|
|
return (
|
|
@@ -52,8 +79,8 @@ const FlipPic = ({ activeIndex }: { activeIndex: number }) => {
|
|
|
className={`${styles.flipPic} ${isAnimating ? 'active' : ''}`}
|
|
|
>
|
|
|
{[1, 2, 3].map((i) => (
|
|
|
- <div className={`picBox picBox${i}`} key={`bg${i}-${activeIndex}`}>
|
|
|
- <div className="title">●{title[`pic${displayIndex + 1}`][i - 1] as any}</div>
|
|
|
+ <div className={`picBox picBox${i}`} key={`bg${i}-${activeIndex}`} onClick={() => window.open(title[`pic${displayIndex + 1}`][i - 1].link)}>
|
|
|
+ <div className="title">●{title[`pic${displayIndex + 1}`][i - 1].name as any}</div>
|
|
|
<div className='pic'>
|
|
|
<img
|
|
|
className='front'
|