/* eslint-disable jsx-a11y/iframe-has-title */ import React, { useCallback, useState } from "react"; import styles from "./index.module.scss"; import classNames from "classnames"; import history from "@/utils/history"; import A0Map from "../A0Map"; import { envData, envDataSonType, envDataType, envUrl } from "@/utils/env"; import Tab1 from "./Tab1"; import Tab4 from "./Tab4"; function A2Main() { // 传给历史 const [swData, setSwData] = useState([]); // 右侧选中的状态 const [type, setType] = useState(0); const typeChangeFu = useCallback((item: envDataType) => { setSwData(item.data); setType(item.id); }, []); return (
{/* 图片页面 */}
setType(val)} />
{/* 左上方logo */}
history.push("/")}>
{/* 底部轮播图 */}
{envData.map((v) => (
typeChangeFu(v)} className={classNames( "row", `row${v.id}`, type === v.id ? `rowAc${v.id}` : "" )} key={v.id} >
))} {/* 展开收起按钮 */}
{ if (type) setType(0); else typeChangeFu(envData[0]); }} >
{/* 历史 */} { type === 1 ? ( ) : type === 4 ? ( ) : type === 5 ? null : null // }
); } const MemoA2Main = React.memo(A2Main); export default MemoA2Main;