|
@@ -2,12 +2,14 @@ import React, { useState, useRef } from 'react'
|
|
|
import styles from './index.module.scss'
|
|
import styles from './index.module.scss'
|
|
|
import { useSelector } from 'react-redux'
|
|
import { useSelector } from 'react-redux'
|
|
|
import { RootState } from '@/store'
|
|
import { RootState } from '@/store'
|
|
|
|
|
+import { Toast } from 'antd-mobile'
|
|
|
|
|
|
|
|
type InfoCardProps = {
|
|
type InfoCardProps = {
|
|
|
time: string
|
|
time: string
|
|
|
location: string
|
|
location: string
|
|
|
text?: string
|
|
text?: string
|
|
|
from: string
|
|
from: string
|
|
|
|
|
+ inset?: string
|
|
|
}
|
|
}
|
|
|
function Sinicize() {
|
|
function Sinicize() {
|
|
|
|
|
|
|
@@ -17,6 +19,7 @@ function Sinicize() {
|
|
|
const [selectedTime, setSelectedTime] = useState(0)
|
|
const [selectedTime, setSelectedTime] = useState(0)
|
|
|
const [isShowTip, setIsShowTip] = useState(false)
|
|
const [isShowTip, setIsShowTip] = useState(false)
|
|
|
const [currentImgIndex, setCurrentImgIndex] = useState(0)
|
|
const [currentImgIndex, setCurrentImgIndex] = useState(0)
|
|
|
|
|
+ const [isShowLine, setIsShowLine] = useState(true)
|
|
|
|
|
|
|
|
const originRef = useRef<HTMLDivElement>(null)
|
|
const originRef = useRef<HTMLDivElement>(null)
|
|
|
const sinicize1Ref = useRef<HTMLDivElement>(null)
|
|
const sinicize1Ref = useRef<HTMLDivElement>(null)
|
|
@@ -44,6 +47,14 @@ function Sinicize() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const handleYearItemClick = (index: number) => {
|
|
const handleYearItemClick = (index: number) => {
|
|
|
|
|
+ if (index !== 0) {
|
|
|
|
|
+ console.log('1111111111111')
|
|
|
|
|
+ Toast.show({
|
|
|
|
|
+ icon: 'fail',
|
|
|
|
|
+ content: '暂未开放'
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
setCurrentImgIndex(0)
|
|
setCurrentImgIndex(0)
|
|
|
if (selectedTime === index) {
|
|
if (selectedTime === index) {
|
|
|
setSelectedTime(-1)
|
|
setSelectedTime(-1)
|
|
@@ -83,17 +94,16 @@ function Sinicize() {
|
|
|
// ori_touchStartX.current = e.touches[0].clientY
|
|
// ori_touchStartX.current = e.touches[0].clientY
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
- const InfoCard = ({ time, location, text, from }: InfoCardProps) => {
|
|
|
|
|
|
|
+ const InfoCard = ({ time, location, text, from, inset }: InfoCardProps) => {
|
|
|
return (
|
|
return (
|
|
|
- <div className={styles.InfoCard}>
|
|
|
|
|
- <div className="dotLeft"></div>
|
|
|
|
|
|
|
+ <div className={styles.InfoCard} style={{ inset: inset }}>
|
|
|
|
|
+ <div className="dotLeft"><img src={require('@/assets/img/A6_arrow.png')} alt="" /></div>
|
|
|
<div className="main">
|
|
<div className="main">
|
|
|
- <div className="time"></div>
|
|
|
|
|
- <div className="location"></div>
|
|
|
|
|
- <div className="text"></div>
|
|
|
|
|
- <div className="from"></div>
|
|
|
|
|
|
|
+ <div className="time">{time}</div>
|
|
|
|
|
+ <div className="location">{location}</div>
|
|
|
|
|
+ <div className="text">{text}</div>
|
|
|
|
|
+ <div className="from">{from}</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div className="dotRight"></div>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
@@ -196,13 +206,16 @@ function Sinicize() {
|
|
|
<div className="lTop">{sItem.desc}</div>
|
|
<div className="lTop">{sItem.desc}</div>
|
|
|
<div className="lContent">
|
|
<div className="lContent">
|
|
|
<div className="lImgBox">
|
|
<div className="lImgBox">
|
|
|
- <InfoCard
|
|
|
|
|
|
|
+ <img src={isShowLine ? sItem.imgItems[0].srcLine : sItem.imgItems[0].src} alt="" />
|
|
|
|
|
+ {!isShowLine && <InfoCard
|
|
|
time={sItem.imgItems[0].title}
|
|
time={sItem.imgItems[0].title}
|
|
|
location={sItem.imgItems[0].title}
|
|
location={sItem.imgItems[0].title}
|
|
|
text={sItem.imgItems[0].txt}
|
|
text={sItem.imgItems[0].txt}
|
|
|
from={sItem.imgItems[0].title}
|
|
from={sItem.imgItems[0].title}
|
|
|
- />
|
|
|
|
|
- <img src={sItem.imgItems[0].src} alt="" />
|
|
|
|
|
|
|
+ />}
|
|
|
|
|
+ <div className="point">
|
|
|
|
|
+ <div className="pointText">123</div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
<div className="lInfo">
|
|
<div className="lInfo">
|
|
|
{sItem.items.map((i, index) => (
|
|
{sItem.items.map((i, index) => (
|