|
|
@@ -4,20 +4,18 @@ import { callIframeFu } from '@/utils/history'
|
|
|
import Intro from '@/pages/A2yblm/components/Intro'
|
|
|
import Detail from '@/pages/A2yblm/components/Detail'
|
|
|
import ModalTxt from '@/pages/A2yblm/components/ModalTxt'
|
|
|
-import { isPc } from '@/utils/http'
|
|
|
import MenuSider from '@/components/MenuSider'
|
|
|
import classNames from 'classnames'
|
|
|
import { useSelector } from 'react-redux'
|
|
|
import { RootState } from '@/store'
|
|
|
+import Zback from '@/components/Zback'
|
|
|
|
|
|
function A2yblm() {
|
|
|
-
|
|
|
- const {myData} = useSelector((state: RootState) => state.A0Layout)
|
|
|
+ const { myData, myLangue } = useSelector((state: RootState) => state.A0Layout)
|
|
|
|
|
|
const [currentTab, setCurrentTab] = useState('tab1')
|
|
|
|
|
|
useEffect(() => {
|
|
|
-
|
|
|
const urlAll = window.location.href
|
|
|
|
|
|
if (urlAll.includes('?m=')) {
|
|
|
@@ -28,7 +26,7 @@ function A2yblm() {
|
|
|
|
|
|
const [isShowTabBar, setIsShowTabBar] = useState(true)
|
|
|
const [isShowMzmTitle, setIsShowMzmTitle] = useState(false)
|
|
|
- const previousTab = useRef(currentTab);
|
|
|
+ const previousTab = useRef(currentTab)
|
|
|
|
|
|
const [isOpenMzm, setIsOpenMzm] = useState(false)
|
|
|
const [currentTagIndex, setCurrentTagIndex] = useState(1)
|
|
|
@@ -46,8 +44,6 @@ function A2yblm() {
|
|
|
|
|
|
// 退出图像赏析时调用showHotspot(-1) 退出碑文解读时调用showInscription(-1)
|
|
|
useEffect(() => {
|
|
|
-
|
|
|
-
|
|
|
if (currentTab === 'tab2') setIsShowTag(true)
|
|
|
if (currentTab !== 'tab2') {
|
|
|
setCurrentTagIndex(1)
|
|
|
@@ -65,7 +61,7 @@ function A2yblm() {
|
|
|
}
|
|
|
callIframeFu('changePanel', currentTab === 'tab1' ? 1 : currentTab === 'tab2' ? 2 : 3)
|
|
|
|
|
|
- previousTab.current = currentTab; // 更新前一个tab值
|
|
|
+ previousTab.current = currentTab // 更新前一个tab值
|
|
|
}, [currentTab])
|
|
|
|
|
|
const backToBase = () => {
|
|
|
@@ -75,12 +71,11 @@ function A2yblm() {
|
|
|
window.location.replace('#/base')
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// 底部文字
|
|
|
const [bottomTxt, setBottomTxt] = useState('')
|
|
|
|
|
|
return (
|
|
|
- <div className={classNames(isPc ? '' : styles.A2yblmMo, styles.A2yblm)}>
|
|
|
+ <div className={classNames(myLangue === 'ZH' ? '' : styles.A2yblmEn, styles.A2yblm)}>
|
|
|
{/* 左侧边 */}
|
|
|
<div className='A2_tabBar' style={{ display: isShowTabBar ? 'flex' : 'none' }}>
|
|
|
<div
|
|
|
@@ -110,9 +105,9 @@ function A2yblm() {
|
|
|
</div>
|
|
|
|
|
|
{/* 返回,文物鉴赏,全文鉴赏 */}
|
|
|
- <div className='back' onClick={backToBase}>
|
|
|
- <img src={require('@/assets/img/btn_back.png')} alt='' />
|
|
|
- </div>
|
|
|
+
|
|
|
+ <Zback clickFu={() => backToBase()} />
|
|
|
+
|
|
|
<div className='wenwu' onClick={gotoQuanwenOrWenwu}>
|
|
|
<img
|
|
|
src={require(`@/assets/img/A2_${currentTab === 'tab3' ? 'quanwen' : 'wenwu'}.png`)}
|
|
|
@@ -174,7 +169,11 @@ function A2yblm() {
|
|
|
</div>
|
|
|
)}
|
|
|
{currentTab === 'tab3' && (
|
|
|
- <ModalTxt setBottomTxt={(val) => setBottomTxt(val)} setIsShowTabBar={setIsShowTabBar} setIsShowMzmTitle={setIsShowMzmTitle} />
|
|
|
+ <ModalTxt
|
|
|
+ setBottomTxt={val => setBottomTxt(val)}
|
|
|
+ setIsShowTabBar={setIsShowTabBar}
|
|
|
+ setIsShowMzmTitle={setIsShowMzmTitle}
|
|
|
+ />
|
|
|
)}
|
|
|
|
|
|
{/* menu界面 */}
|
|
|
@@ -189,7 +188,7 @@ function A2yblm() {
|
|
|
: myData.detail_modal.top[currentTagIndex].title}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div className="arrow">
|
|
|
+ <div className='arrow'>
|
|
|
<div className='tagInfoLine1'></div>
|
|
|
<div className='tagInfoLine2'></div>
|
|
|
<div className='icon'>
|
|
|
@@ -198,11 +197,14 @@ function A2yblm() {
|
|
|
</div>
|
|
|
</div>
|
|
|
<div className='content'>
|
|
|
- <div dangerouslySetInnerHTML={{
|
|
|
- __html: currentTagIndex >= myData.detail_modal.top.length
|
|
|
- ? myData.detail_modal.bottom[currentTagIndex - myData.detail_modal.top.length].txt
|
|
|
- : myData.detail_modal.top[currentTagIndex].txt
|
|
|
- }}></div>
|
|
|
+ <div
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
+ __html:
|
|
|
+ currentTagIndex >= myData.detail_modal.top.length
|
|
|
+ ? myData.detail_modal.bottom[currentTagIndex - myData.detail_modal.top.length].txt
|
|
|
+ : myData.detail_modal.top[currentTagIndex].txt
|
|
|
+ }}
|
|
|
+ ></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|