|
|
@ -4,11 +4,17 @@ import { notFound } from 'next/navigation';
|
|
|
|
import { Category, JournalRecommendList, JournalItem, Pagination, RedirectCheck, ButtonFM } from '@/components';
|
|
|
|
import { Category, JournalRecommendList, JournalItem, Pagination, RedirectCheck, ButtonFM } from '@/components';
|
|
|
|
import { apiSearchCategoryList, apiGetJournalRecommendWithCollect, apiJournalList } from '@/services';
|
|
|
|
import { apiSearchCategoryList, apiGetJournalRecommendWithCollect, apiJournalList } from '@/services';
|
|
|
|
|
|
|
|
|
|
|
|
import type { Metadata } from 'next';
|
|
|
|
// export const metadata: Metadata = {
|
|
|
|
|
|
|
|
// title: '期刊',
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
|
|
|
export async function generateMetadata({ params: { category } }: { params: { category?: string } }) {
|
|
|
|
title: '期刊',
|
|
|
|
if (category && category !== 'all') {
|
|
|
|
};
|
|
|
|
const categoryList = await getCategoryList();
|
|
|
|
|
|
|
|
const categoryInfo: Category | undefined = categoryList.find((item: Category) => item.nameEn === category);
|
|
|
|
|
|
|
|
return { title: categoryInfo?.nameCh, descrition: categoryInfo?.description };
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const getCategoryList = async () => {
|
|
|
|
const getCategoryList = async () => {
|
|
|
|
const result = await apiSearchCategoryList();
|
|
|
|
const result = await apiSearchCategoryList();
|
|
|
|