|
|
|
@ -1,23 +1,10 @@
|
|
|
|
|
import HotJournalCard from './HotJournalCard';
|
|
|
|
|
|
|
|
|
|
import { apiJournalList } from '@/services/server/journal';
|
|
|
|
|
import { apiJournalRecommend } 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,
|
|
|
|
|
const RecommondJournal = async ({ categoryId }: { categoryId: string }) => {
|
|
|
|
|
const journalList: JournalInfo[] = await apiJournalRecommend({
|
|
|
|
|
id: categoryId,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
@ -26,10 +13,8 @@ const RecommondJournal = async ({
|
|
|
|
|
<div className="text-[17px] leading-[23.8px]">热门推荐</div>
|
|
|
|
|
|
|
|
|
|
{/* 期刊 list */}
|
|
|
|
|
<div className="flex flex-col gap-[60px] mt-[17px]">
|
|
|
|
|
{journalList.rows.map((item: JournalInfo) => (
|
|
|
|
|
<HotJournalCard key={item.id} {...item} />
|
|
|
|
|
))}
|
|
|
|
|
<div className="flex flex-col gap-[30px] mt-[17px]">
|
|
|
|
|
{journalList?.length && journalList.map((item: JournalInfo) => <HotJournalCard key={item.id} {...item} />)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|