|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/** 期刊详情 */
|
|
|
|
|
import { notFound } from 'next/navigation';
|
|
|
|
|
import { notFound, redirect, RedirectType } from 'next/navigation';
|
|
|
|
|
|
|
|
|
|
import { SongCardList, JournalRecommendList, Comment, CollectButton, VolDetailCoverCard } from '@/components';
|
|
|
|
|
import { apiGetJournalInfoById, apiGetSongsByJournalNo, apiGetJournalRecommendById } from '@/services';
|
|
|
|
@ -20,9 +20,19 @@ const getData = async (journalId: string) => {
|
|
|
|
|
return { journalInfo: journalInfoRes.data, songList: songListRes.data, recommendList: recommendList.data };
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default async function JournalDetail({ params: { journalId } }: { params: { journalId: string } }) {
|
|
|
|
|
export default async function JournalDetail({
|
|
|
|
|
params: { journalId },
|
|
|
|
|
searchParams: { mobile },
|
|
|
|
|
}: {
|
|
|
|
|
params: { journalId: string };
|
|
|
|
|
searchParams: { mobile: string };
|
|
|
|
|
}) {
|
|
|
|
|
const { journalInfo, songList, recommendList } = await getData(journalId);
|
|
|
|
|
|
|
|
|
|
if (mobile) {
|
|
|
|
|
redirect(`${process.env.NEXT_PUBLIC_MOBILE_HOST}/html/journal.html?id=${journalInfo.id}`, RedirectType.replace);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<main className="w-[1200px] mx-auto flex flex-row justify-between pt-[145px]">
|
|
|
|
|
<div className="w-[712px]">
|
|
|
|
|