解决无痕模式下首次加载无数据问题 #824
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@
|
|||
gap: 20px;
|
||||
|
||||
.project-list-item {
|
||||
min-width: 0;
|
||||
padding: 40px 30px;
|
||||
background: #ffffff;
|
||||
border: 2px solid;
|
||||
|
|
@ -185,6 +186,7 @@
|
|||
}
|
||||
|
||||
.project-list-item-tag {
|
||||
flex-wrap: wrap;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue