import FlieBox from '@/components/FileBoxAD' import HocError from '@/Hoc/HocError' import { QuestionCircleFilled } from '@ant-design/icons' import { Button, Space, Tabs, Tooltip } from 'antd' import React, { useEffect, useState } from 'react' import { useModel } from 'umi' import AddLandingPage from '../../components/addLandingPage' import BathLauCopy from '../../components/bathLauCopy' import LookLanding from '../../components/lookLanding' import style from './index.less' const { TabPane } = Tabs; function Cloud() { /**********************/ const { state, set, getList, init, typeEnum, list } = useModel('useLaunchAdq.useBdMedia') const { mediaType, belongUser, parentId } = state const [visible, setVisible] = useState(false) const [lookVisible, setLookVisible] = useState(false) const [copyVisible, setCopyVisible] = useState(false) const [id, setId] = useState(0) /**********************/ /**加载组件或数据更新执行请求列表 */ useEffect(() => { if (belongUser === '1' || belongUser === '0') { getList() } }, [mediaType, belongUser, parentId]) return
{ init({ mediaType: activeKey })//切换类型时先初始化数据,并设置类型 }} className={style.card} activeKey={mediaType} > { ['IMG', 'VIDEO', 'PAGE'].map((key: any) => { return { set({ belongUser: activeKey }) }} activeKey={belongUser} tabBarExtraContent={ { mediaType === 'PAGE' ? : } }> { setId(data || 0) if (type === 0 || type === 2) { setVisible(true) } else if (type === 1) { setLookVisible(true) } else if (type) { setCopyVisible(true) } }} /> }) } {/* 落地页新增 复制 */} {visible && setVisible(false)} ajax={list} id={id} />} {/* 查看落地页 */} {lookVisible && setLookVisible(false)} id={id} />} {/* 批量复制 */} {copyVisible && setCopyVisible(false)} id={id} ajaxHome={list} />}
} export default HocError(Cloud)