diff --git a/src/components/layout/Article/index.tsx b/src/components/layout/Article/index.tsx
index 0cf01ce..aaf8149 100644
--- a/src/components/layout/Article/index.tsx
+++ b/src/components/layout/Article/index.tsx
@@ -5,6 +5,7 @@ import { useStore } from "@/store";
type Data = {
title: string;
createTime: string;
+ publishTime: string;
readTimes: string | number;
content: string;
}
@@ -22,7 +23,7 @@ export default function Article({ data, prevItem, nextItem, setDetailId }: {
const appConfig = useStore((s) => s.appConfig);
const {
back = "返回",
- publishTime = "发布时间",
+ publishTime: publishTimeText = "发布时间",
readTimes = "阅读次数",
prevArticle = "上一篇",
nextArticle = "下一篇",
@@ -38,7 +39,7 @@ export default function Article({ data, prevItem, nextItem, setDetailId }: {
{data.title}
- {publishTime}:{dateFormat(data.createTime, 'yyyy-MM-dd')}
+ {publishTimeText}:{dateFormat(data.publishTime || data.createTime, 'yyyy-MM-dd')}
{readTimes}:{data.readTimes}
diff --git a/src/pages/Home/Home.module.css b/src/pages/Home/Home.module.css
index 038007f..7f6b12b 100644
--- a/src/pages/Home/Home.module.css
+++ b/src/pages/Home/Home.module.css
@@ -420,6 +420,7 @@
margin: 0 0 0.5rem;
line-height: 1.6;
height: 4.375rem;
+ max-width: 37.5rem;
display: -webkit-box;
-webkit-line-clamp: 2;
diff --git a/src/pages/Home/index.tsx b/src/pages/Home/index.tsx
index f0726ae..09f1d0b 100644
--- a/src/pages/Home/index.tsx
+++ b/src/pages/Home/index.tsx
@@ -114,7 +114,7 @@ function News({data}: any) {
return {
id: item.id,
title: item.title,
- date: item.create_time,
+ date: item.publish_time || item.create_time,
image: item.covers_show === 'image' ? item.covers.image[0] : '',
video: item.covers_show === 'video' ? item.covers.video[0] : '',
snippet: item.content,
@@ -127,7 +127,7 @@ function News({data}: any) {
}, []);
useEffect(() => {
- const category_id = categoryList?.find((item: any) => item.name === '【首页】新闻资讯')?.id;
+ const category_id = categoryList?.find((item: any) => item.name === '【集团发布】')?.id;
handleSearch(category_id)
}, [])
return (
diff --git a/src/pages/Join/Culture.module.css b/src/pages/Join/Culture.module.css
index 25f5a6e..ec529b5 100644
--- a/src/pages/Join/Culture.module.css
+++ b/src/pages/Join/Culture.module.css
@@ -41,11 +41,12 @@
font-weight: 400;
font-size: 1.125rem;
color: #FFFFFF;
- line-height: 2.5rem;
+ /* line-height: 2.5rem; */
height: 0;
opacity: 0;
- overflow: hidden;
+ /* overflow: hidden; */
transition: all 0.3s ease-in-out;
+ text-align: center;
}
}
diff --git a/src/pages/News/Detail.tsx b/src/pages/News/Detail.tsx
index ee8a32c..a14ed78 100644
--- a/src/pages/News/Detail.tsx
+++ b/src/pages/News/Detail.tsx
@@ -7,6 +7,7 @@ type NewsDetail = {
id: number;
title: string;
createTime: string;
+ publishTime: string;
readTimes: number;
content: string;
lang: "lang" | "EN"
@@ -30,6 +31,7 @@ export default function NewsDetail() {
id: item.id,
title: item.title,
createTime: item.create_time,
+ publishTime: item.publish_time,
readTimes: item.count,
content: item.content,
lang: item.lang,
diff --git a/src/pages/News/NewsPublic.tsx b/src/pages/News/NewsPublic.tsx
index f0fd008..2a7780a 100644
--- a/src/pages/News/NewsPublic.tsx
+++ b/src/pages/News/NewsPublic.tsx
@@ -13,6 +13,7 @@ type NewsItem = {
id: number;
title: string;
createTime: string;
+ publishTime: string;
image: string;
video: string;
lang: "ZH" | "EN"
@@ -43,6 +44,7 @@ export default function NewsPublic() {
id: item.id,
title: item.title,
createTime: item.create_time,
+ publishTime: item.publish_time,
image: item.covers_show === 'image' ? item.covers.image[0] : '',
video: item.covers_show === 'video' ? item.covers.video[0] : '',
lang: item.lang,
@@ -123,7 +125,7 @@ export default function NewsPublic() {
{item.title}
- {dateFormat(item.createTime, "yyyy-MM-dd")}
+ {dateFormat(item.publishTime || item.createTime, "yyyy-MM-dd")}