diff --git a/src/forge/Information/Pages/homepage/nscc.jsx b/src/forge/Information/Pages/homepage/nscc.jsx index 02e7ceabb..9644c6aec 100644 --- a/src/forge/Information/Pages/homepage/nscc.jsx +++ b/src/forge/Information/Pages/homepage/nscc.jsx @@ -8,7 +8,7 @@ import SpecialProjectsByNSCC from './component/specialProjectsByNSCC'; import '../../indexZone1.scss' import './index.scss' import { getUniqueIdentifier, getUserName, getBrowserPlatform, getBrowserBrand } from '../../utils' -import { getNewsDetail, getSubDocList, getZoneStatistics, setZoneVisits } from '../../api' +import { getDocAndContentList, getNewsDetail, getSubDocList, getZoneStatistics, setZoneVisits } from '../../api' import { Anchor, Carousel } from 'antd'; import { Base64 } from 'js-base64'; import CountUp from 'react-countup'; @@ -54,17 +54,22 @@ function HeaderPageUos(props) { setZoneVisits({ url, username, uuid, remark }) // 获取【关于超算】栏目的文章列表 - getSubDocList(window.location.host.includes("gitlink.org.cn") ? 1039 : 2810, { pageSize: 100, pageNum: 1, auditStatus: 1 }).then(async (result) => { - if (!result) return; - const rows = result.data.rows || []; - await Promise.all( - rows.map(async (item) => { - const detail = await getNewsDetail(item.id); - if (detail) item.docContent = detail.data.data.content; - }) - ); - setMainList(rows); - }).catch(console.error); + getDocAndContentList(window.location.host.includes("gitlink.org.cn") ? 1039 : 2810).then(res=>{ + if(res && res.data && res.data.code === 200){ + setMainList(res.data.rows) + } + }) + // getSubDocList(window.location.host.includes("gitlink.org.cn") ? 1039 : 2810, { pageSize: 100, pageNum: 1, auditStatus: 1 }).then(async (result) => { + // if (!result) return; + // const rows = result.data.rows || []; + // await Promise.all( + // rows.map(async (item) => { + // const detail = await getNewsDetail(item.id); + // if (detail) item.docContent = detail.data.data.content; + // }) + // ); + // setMainList(rows); + // }).catch(console.error); InitContentObs(); // 滚动监听 @@ -145,7 +150,7 @@ function HeaderPageUos(props) {