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 ) }