Merge pull request '解决无痕模式下首次加载无数据问题' (#824) from gitlink_ssr_head into pre_gitlink_ssr

This commit is contained in:
durian 2026-04-17 16:49:44 +08:00
commit b817329bf7
3 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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;

View File

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