diff --git a/src/app/vol/list/[category]/[[...page]]/page.tsx b/src/app/vol/list/[category]/[[...page]]/page.tsx index cccb148..bd7554b 100644 --- a/src/app/vol/list/[category]/[[...page]]/page.tsx +++ b/src/app/vol/list/[category]/[[...page]]/page.tsx @@ -13,7 +13,23 @@ export const metadata: Metadata = { const getCategoryList = async () => { const result = await apiSearchCategoryList(); if (result.code !== 200) return notFound(); - return result.data; + + // 去除空格 + const list: Category[] = result.data.map((item) => { + return { ...item, nameEn: item.nameEn.replace(/ /g, '') }; + }); + + // 添加“全部”tag + list.unshift({ + id: '0', + nameCh: '全部', + nameEn: 'all', + image: '', + thumbnail: '', + description: '', + }); + + return list; }; const getRecommendList = async () => { @@ -45,7 +61,7 @@ export default async function Journal({ params }: { params: { category?: string; {/* 左侧 */}