From 8a49465f3cc7a57b4823936e7e8ae242ecedb4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Wed, 3 Jun 2026 16:12:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E7=AE=97=E9=A6=96=E9=A1=B5-=E5=85=B3?= =?UTF-8?q?=E4=BA=8E=E6=88=91=E4=BB=AC=E6=96=87=E7=AB=A0=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=9B=B4=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Information/Pages/homepage/nscc.jsx | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) 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) {
{mainList.map(item => { - return
+ return
})}