update: journal components

mack-mac
mackt 8 months ago
parent 367da6a389
commit 248875ae12

@ -11,8 +11,6 @@ export default function JournalCard({
totalCommentReply, totalCommentReply,
commentList, commentList,
}: JournalInfo) { }: JournalInfo) {
console.log({ commentList });
return ( return (
<div className="flex flex-col w-[712px] rounded-[6px] bg-[#fff] "> <div className="flex flex-col w-[712px] rounded-[6px] bg-[#fff] ">
{/* banner container */} {/* banner container */}

@ -0,0 +1,46 @@
import Image from 'next/image';
import JournalCard from './JournalCard';
import { apiJournalList } from '@/services/server/journal';
const RecommondJournal = async ({
categoryId,
journalNoRange,
pageNum,
pageSize,
}: {
categoryId?: string;
journalNoRange?: string;
pageNum?: number;
pageSize?: number;
}) => {
const journalList: JournalList = await apiJournalList({
categoryId,
journalNoRange,
pageNum,
pageSize,
});
return (
<div className="flex flex-col mt-[33px]">
{/* 分类 & 电台 */}
<div className="flex flex-row items-center justify-between">
<div className="text-[17px] leading-[23.8px]">{'摇滚'}</div>
<div className="flex flex-row items-center cursor-pointer">
<Image className="mr-[6px]" width={24} height={24} src={'/img/icon/fm.svg'} alt="FM" />
<p className="text-[15px] leading-[21px]"></p>
</div>
</div>
{/* 期刊 list */}
<div className="flex flex-col gap-[60px] mt-[17px]">
{journalList.rows.map((item: JournalInfo) => (
<JournalCard key={item.id} {...item} />
))}
</div>
</div>
);
};
export default RecommondJournal;

@ -4,12 +4,16 @@ export { default as Footer } from './Footer';
// Home // Home
export { default as TagCategory } from './TagCategory'; export { default as TagCategory } from './TagCategory';
export { default as JournalList } from './JournalList';
export { default as ContributorCard } from './ContributorCard'; export { default as ContributorCard } from './ContributorCard';
// Login
export { default as LoginModal } from './Login/LoginModal'; export { default as LoginModal } from './Login/LoginModal';
export { default as LoginForm } from './Login/LoginForm'; export { default as LoginForm } from './Login/LoginForm';
// Journal
export { default as JournalCard } from './Journal/JournalCard';
export { default as JournalList } from './Journal/JournalList';
// Common // Common
export { default as Input } from './common/Input'; export { default as Input } from './common/Input';
export { default as Button } from './common/Button'; export { default as Button } from './common/Button';

Loading…
Cancel
Save