update: 文章页添加邀请banner

main
fadeaway 8 months ago
parent 12857b80f1
commit 3254f30407

@ -7,6 +7,8 @@ import { useState, useEffect, useMemo } from 'react';
import Image from 'next/image'; import Image from 'next/image';
import InviteBanner from '@/components/InviteBanner';
// 获取文章信息 // 获取文章信息
async function getArticleInfo(journalId: string) { async function getArticleInfo(journalId: string) {
const res = await fetch(`http://api.indie.cn:9012/luoo-music/article/${journalId}`); const res = await fetch(`http://api.indie.cn:9012/luoo-music/article/${journalId}`);
@ -38,7 +40,9 @@ export default function Article() {
}, [articleInfo?.date]); }, [articleInfo?.date]);
return ( return (
<main className="max-w-screen-sm min-h-screen mx-auto flex flex-col items-center text-[#000000f2] font-normal bg-white px-[18px] pt-[14px] pb-[36px]"> <main className="max-w-screen-sm min-h-screen mx-auto flex flex-col items-center text-[#000000f2] font-normal bg-white px-[18px] pt-[64px] pb-[36px]">
<InviteBanner />
<h1 className="font-600 text-[22px] leading-[30.8px] text-left w-full">{articleInfo?.title}</h1> <h1 className="font-600 text-[22px] leading-[30.8px] text-left w-full">{articleInfo?.title}</h1>
{(articleInfo?.userName || displayDate) && ( {(articleInfo?.userName || displayDate) && (
<p className="w-full flex items-center text-[12px] text-[#000000b2] leading-[16.8px] mt-[6px]"> <p className="w-full flex items-center text-[12px] text-[#000000b2] leading-[16.8px] mt-[6px]">

@ -1,7 +1,7 @@
/** /**
* *
*/ */
import JournalBanner from '@/components/JournalBanner'; import InviteBanner from '@/components/InviteBanner';
import JournalContent from '@/components/JournalContent'; import JournalContent from '@/components/JournalContent';
import type { Metadata } from 'next'; import type { Metadata } from 'next';
@ -11,7 +11,7 @@ export const metadata: Metadata = { title: '雀乐期刊' };
export default function Journal() { export default function Journal() {
return ( return (
<main className="max-w-screen-sm min-h-screen mx-auto flex flex-col items-center font-normal text-[#000000f2] bg-gradient-to-b from-[#030303] to-[#1f1f20]"> <main className="max-w-screen-sm min-h-screen mx-auto flex flex-col items-center font-normal text-[#000000f2] bg-gradient-to-b from-[#030303] to-[#1f1f20]">
<JournalBanner /> <InviteBanner />
<JournalContent /> <JournalContent />
</main> </main>
); );

@ -4,7 +4,7 @@
import ImageWithBasePath from '@/components/ImageWithBasePath'; import ImageWithBasePath from '@/components/ImageWithBasePath';
export default function JournalBanner() { export default function InviteBanner() {
// const router = useRouter(); // const router = useRouter();
const handleClick = () => { const handleClick = () => {
// router.push('/download'); // router.push('/download');
Loading…
Cancel
Save