import React from 'react';
// import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Card, Tabs } from 'antd';
import Basic from './compents/Basic'
import Share from '@/components/Share';
import Poster from '@/components/Poster'

const { TabPane } = Tabs;

export default props => {
    const newsId = props.location.query.newsId

    const target = { id:newsId, type: 'news' }
//   const [dynamicData, setDynamicData] = useState({});

//   useEffect(() => {
//     if (newsId) {
//       getDynamicData(newsId);
//     }
//   }, [newsId]);

//   // 查询列表
//   const getDynamicData = newsId => {
//     request({ ...apis.news.get, urlData: { id: newsId } })
//       .then(data => {
//         setDynamicData(data);
//         setExtraData(data);
//         // detailVisible = data.newsDetailType == '1'
//         // urlVisible = data.newsDetailType == '0'
//       })
//       .catch(err => {
//         console.log(err);
//         message.info(err.msg || err.message);
//       });
//   };

  return (
    <Card>
      {/* <Tabs defaultActiveKey="1">
        <TabPane tab="基本信息" key="1"> */}
          {/* <div style={{ maxWidth: 1000 }}> */}
            <Basic newsId={newsId} />
          {/* </div> */}
        {/* </TabPane>

        <TabPane tab="海报图片" key="2">
        <Poster target={target} />
      
        </TabPane>
        <TabPane tab="分享设置" key="3">
        <Share target={target} />
        </TabPane>
      </Tabs> */}
    </Card>
  );
};
