From efd12019abf6e0eda5ae2d145dc67afd1da14eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Fri, 17 Apr 2026 16:48:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=97=A0=E7=97=95=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E4=B8=8B=E9=A6=96=E6=AC=A1=E5=8A=A0=E8=BD=BD=E6=97=A0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Information/Pages/homepage/nscc.jsx | 2 +- src/forge/Information/fetch.js | 2 +- src/forge/Information/index.jsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/forge/Information/Pages/homepage/nscc.jsx b/src/forge/Information/Pages/homepage/nscc.jsx index 35ae28cd..1ae7d885 100644 --- a/src/forge/Information/Pages/homepage/nscc.jsx +++ b/src/forge/Information/Pages/homepage/nscc.jsx @@ -43,7 +43,7 @@ function HeaderPageUos(props) { // 获取【关于超算】栏目的文章列表 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; + const rows = result.data.rows || []; await Promise.all( rows.map(async (item) => { const detail = await getNewsDetail(item.id); diff --git a/src/forge/Information/fetch.js b/src/forge/Information/fetch.js index b8314f50..eeecf089 100644 --- a/src/forge/Information/fetch.js +++ b/src/forge/Information/fetch.js @@ -49,7 +49,7 @@ function beforeFetch(actionUrl){ return service; } let settings = localStorage.chromesetting&& localStorage.chromesetting !=="undefined"&& JSON.parse(localStorage.chromesetting); -let actionUrl = settings && settings.common.zone +'/api'; +let actionUrl = settings ? settings.common.zone +'/api' : "https://gateway.gitlink.org.cn/api"; const service = beforeFetch(actionUrl); export const httpUrl = actionUrl; diff --git a/src/forge/Information/index.jsx b/src/forge/Information/index.jsx index 63863b1c..72e6a371 100644 --- a/src/forge/Information/index.jsx +++ b/src/forge/Information/index.jsx @@ -165,7 +165,7 @@ function Index(props){ props.history.push('/nopage'); return } - let data = result.data.data; + let data = result.data.data || {}; if (data && data.template) { setTemp( data.template ) }