diff --git a/src/app/journal/page.tsx b/src/app/journal/page.tsx index 48b9117..81dc000 100644 --- a/src/app/journal/page.tsx +++ b/src/app/journal/page.tsx @@ -4,6 +4,8 @@ import Image from 'next/image'; import ArticalWrap from '@/components/ArticalWrap'; +import JournalBanner from '@/components/JournalBanner'; +import JournalComment from '@/components/JournalComment'; import SongList from '@/components/SongList'; import type { Metadata } from 'next'; @@ -32,11 +34,7 @@ export default async function Journal({ searchParams: { id } }: any) { const songList = res1?.data; return (
-
- queyue - 邀你一起来【雀乐】听歌 - right-arrow -
+ {/* 期刊封面图 */}
@@ -68,26 +66,7 @@ export default async function Journal({ searchParams: { id } }: any) { -
-
- 说点想说的 -
-
- icon_comment - {journalInfo && journalInfo.totalCommentReplyInt > 0 && ( -
- {journalInfo?.totalCommentReply} -
- )} -
-
+
); } diff --git a/src/app/music/page.tsx b/src/app/music/page.tsx index 4024497..384357c 100644 --- a/src/app/music/page.tsx +++ b/src/app/music/page.tsx @@ -1,9 +1,9 @@ /** * 歌曲播放页面 */ -import Image from 'next/image'; import EnterQueyueBtn from '@/components/EnterQueyueBtn'; +import MusicBanner from '@/components/MusicBanner'; import MusicPanel from '@/components/MusicPanel'; async function getMusic(songId: string) { @@ -16,11 +16,7 @@ export default async function Music({ searchParams: { id } }: any) { const musicInfo = res?.data; return (
-
- queyue - 邀你一起来【雀乐】听歌 - right-arrow -
+ diff --git a/src/app/page.tsx b/src/app/page.tsx index d3f8371..49ac5fb 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -4,20 +4,24 @@ import { useRef } from 'react'; import Image from 'next/image'; import Link from 'next/link'; +import { useRouter } from 'next/navigation'; import AppLogo from '@/components/AppLogo'; import WXShareBtn from '@/components/WXComponent/WXShareBtn'; -import { download } from '@/utils/download'; - import useUA from '@/hooks/useUA'; export default function Home() { + const router = useRouter(); const firstScreenRef = useRef(null); const { inWX } = useUA(); const handleDownload = () => { - download(); + if (!inWX) { + window.open('//cdn.indie.cn/release/queyue.apk', '__blank'); + } else { + router.push('/download'); + } }; const handleSlideDown = () => { diff --git a/src/components/JournalBanner/index.tsx b/src/components/JournalBanner/index.tsx new file mode 100644 index 0000000..de66024 --- /dev/null +++ b/src/components/JournalBanner/index.tsx @@ -0,0 +1,27 @@ +'use client'; + +import Image from 'next/image'; +import { useRouter } from 'next/navigation'; + +export default function JournalBanner() { + const router = useRouter(); + const handleClick = () => { + router.push('/download'); + }; + return ( +
+ queyue + 邀你一起来【雀乐】听歌 + right-arrow +
+ ); +} diff --git a/src/components/JournalComment/index.tsx b/src/components/JournalComment/index.tsx new file mode 100644 index 0000000..673f7e0 --- /dev/null +++ b/src/components/JournalComment/index.tsx @@ -0,0 +1,34 @@ +'use client'; + +import Image from 'next/image'; +import { useRouter } from 'next/navigation'; + +export default function JournalComment({ journalInfo }: { journalInfo: any }) { + const router = useRouter(); + const handleClick = () => { + router.push('/download'); + }; + return ( +
+
+ 说点想说的 +
+
+ icon_comment + {journalInfo && journalInfo.totalCommentReplyInt > 0 && ( +
{journalInfo?.totalCommentReply}
+ )} +
+
+ ); +} diff --git a/src/components/MusicBanner/index.tsx b/src/components/MusicBanner/index.tsx new file mode 100644 index 0000000..4cf2f1a --- /dev/null +++ b/src/components/MusicBanner/index.tsx @@ -0,0 +1,21 @@ +'use client'; + +import Image from 'next/image'; +import { useRouter } from 'next/navigation'; + +export default function MusicBanner() { + const router = useRouter(); + const handleClick = () => { + router.push('/download'); + }; + return ( +
+ queyue + 邀你一起来【雀乐】听歌 + right-arrow +
+ ); +}