fix: 细节修改

main
fadeaway 8 months ago
parent 22478a1284
commit 96446c8452

@ -3,6 +3,8 @@
*/
'use client';
import { useEffect } from 'react';
import Image from 'next/image';
import AppLogo from '@/components/AppLogo';
@ -18,6 +20,10 @@ export default function Download() {
download();
};
useEffect(() => {
document.title = '雀乐-下载';
}, []);
return (
<main className="relative max-w-screen-sm min-h-screen mx-auto flex flex-col items-center text-white font-normal bg-gradient-to-b from-[#030303] to-[#1f1f20]">
{inWX && (

@ -4,23 +4,26 @@ import { useRef } from 'react';
import Image from 'next/image';
import Link from 'next/link';
import { useRouter } from 'next/navigation';
// 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 router = useRouter();
const firstScreenRef = useRef<HTMLDivElement>(null);
const { inWX } = useUA();
const handleDownload = () => {
if (!inWX) {
window.open('//cdn.indie.cn/release/queyue.apk', '__blank');
download();
} else {
router.push('/download');
// router.push('/download');
window.location.href = '/html/download.html';
}
};
@ -34,7 +37,7 @@ export default function Home() {
{/* 首屏 */}
<div
ref={firstScreenRef}
className="relative w-full min-h-screen flex flex-col items-center bg-[url(/img/index_background.png)] bg-center bg-cover"
className="relative w-full min-h-screen flex flex-col items-center bg-[url(/html/img/index_background.png)] bg-center bg-cover"
>
{/* title */}
{!inWX && <h1 className="text-center text-[17px] h-[44px] leading-[44px]"></h1>}

@ -2,27 +2,35 @@
import { useState } from 'react';
import { useRouter } from 'next/navigation';
// import { useRouter } from 'next/navigation';
import useUA from '@/hooks/useUA';
export default function EnterQueyueBtn() {
const router = useRouter();
// const router = useRouter();
const [opening, setOpening] = useState(false);
const { inWX } = useUA();
const handleEnterQueyue = () => {
if (opening) return;
setOpening(true);
const { searchParams } = new URL(window.location.href);
const songId = (searchParams as any)?.get('id');
const result = confirm('离开微信,打开第三方应用');
if (result) {
window.location.href = `queyue://play/${songId}`; // 打开某手机上的某个app应用
setTimeout(function () {
// alert('打开应用无效跳转下载页');
router.push('/download');
}, 2000);
setOpening(false);
if (inWX) {
window.location.href = '/html/download.html';
} else {
setOpening(false);
if (opening) return;
setOpening(true);
const { searchParams } = new URL(window.location.href);
const songId = (searchParams as any)?.get('id');
const result = confirm('离开微信,打开第三方应用');
if (result) {
window.location.href = `queyue://play/${songId}`; // 打开某手机上的某个app应用
setTimeout(function () {
// alert('打开应用无效跳转下载页');
// router.push('/download');
window.location.href = '/html/download.html';
}, 2000);
setOpening(false);
} else {
setOpening(false);
}
}
};

@ -1,12 +1,13 @@
'use client';
import Image from 'next/image';
import { useRouter } from 'next/navigation';
// import { useRouter } from 'next/navigation';
export default function JournalBanner() {
const router = useRouter();
// const router = useRouter();
const handleClick = () => {
router.push('/download');
// router.push('/download');
window.location.href = '/html/index.html';
};
return (
<div

@ -1,12 +1,13 @@
'use client';
import Image from 'next/image';
import { useRouter } from 'next/navigation';
// import { useRouter } from 'next/navigation';
export default function JournalComment({ journalInfo }: { journalInfo: any }) {
const router = useRouter();
// const router = useRouter();
const handleClick = () => {
router.push('/download');
// router.push('/download');
window.location.href = '/html/download.html';
};
return (
<section className="w-full flex items-center border-t-[0.8px] border-[#00000019] pt-[14px] pb-[35px] px-[18px] bg-white">

@ -41,8 +41,12 @@ export default function JournalContent() {
setLoading(true);
getInfo((searchParams as any)?.get('id'))
.then(([res0, res1]) => {
setJournalInfo(res0?.data);
const jInfo = res0?.data;
setJournalInfo(jInfo);
setSongList(res1?.data);
if (jInfo?.journalNo && jInfo?.title) {
document.title = `雀乐 VOL.${jInfo?.journalNo} ${jInfo?.title}`;
}
})
.finally(() => {
setLoading(false);
@ -62,7 +66,7 @@ export default function JournalContent() {
<section className="relative w-full flex-1 bg-white mt-[-10px] rounded-tl-[12px] rounded-tr-[12px] z-1 py-[17px] px-[18px] pb-[79px]">
<div className="flex items-center flex-wrap text-[#000000b2] mb-[5px]">
<div className="text-[14px] font-medium leading-[19.6px]">VOL·{journalInfo?.journalNo}</div>
<div className="text-[14px] font-medium leading-[19.6px]">VOL.{journalInfo?.journalNo}</div>
<div className="ml-[11px] flex items-center flex-wrap text-[12px] leading-[12px]">
{journalInfo?.tags?.map((tag: string, index: number) => (
<div

@ -1,12 +1,13 @@
'use client';
import Image from 'next/image';
import { useRouter } from 'next/navigation';
// import { useRouter } from 'next/navigation';
export default function MusicBanner() {
const router = useRouter();
// const router = useRouter();
const handleClick = () => {
router.push('/download');
// router.push('/download');
window.location.href = '/html/index.html';
};
return (
<div

@ -32,7 +32,11 @@ export default function MusicPanel() {
setLoading(true);
getMusic((searchParams as any)?.get('id'))
.then((res) => {
setMusicInfo(res?.data);
const mInfo = res?.data;
setMusicInfo(mInfo);
if (mInfo?.journalNo && mInfo?.title) {
document.title = `雀乐 VOL.${mInfo?.journalNo}-${mInfo?.title}`;
}
})
.finally(() => {
setLoading(false);
@ -80,7 +84,7 @@ export default function MusicPanel() {
<div className="w-full mt-[20px]">
<div className="text-[12px] h-[22px] w-[fit-content] flex items-center text-white rounded-full px-[8px] py-[0] bg-[#2b2b2c]">
VOL&nbsp;{musicInfo?.journalNo}
VOL.{musicInfo?.journalNo}
</div>
</div>
<h5 className="mt-[9px] font-medium text-[20px] leading-[28px] w-full min-h-[28px]">{musicInfo?.title}</h5>

@ -1,7 +1,7 @@
'use client';
import Image from 'next/image';
import { useRouter } from 'next/navigation';
// import { useRouter } from 'next/navigation';
import styles from './index.module.css';
@ -10,14 +10,15 @@ import { useJournalAudioContext } from '@/context/JournalAudioContext';
export default function SongItem(props: { data: ISong }) {
const song = props?.data || {};
const { id, pic, title, artist, album } = song;
const router = useRouter();
// const router = useRouter();
const { curSong, setCurSong, playing, setPlaying } = useJournalAudioContext();
const activeTextColor = curSong?.id && id && curSong?.id === id ? 'text-[#b44343ff]' : '';
// 点击歌曲封面跳转到单曲页面
const handleCoverClick = () => {
router.push(`/music?id=${id}`);
// router.push(`/music?id=${id}`);
window.location.href = `/html/music.html?id=${id}`;
};
// 点击歌曲信息播放歌曲
@ -28,7 +29,8 @@ export default function SongItem(props: { data: ISong }) {
// 点击右侧图标,弹出弹窗(目前先跳转到下载页)
const handleBudsClick = () => {
router.push('/download');
// router.push('/download');
window.location.href = '/html/download.html';
};
return (

@ -1,10 +1,6 @@
{
"compilerOptions": {
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
@ -22,19 +18,9 @@
}
],
"paths": {
"@/*": [
"./src/*"
]
"@/*": ["./src/*"]
}
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"dist/types/**/*.ts"
],
"exclude": [
"node_modules"
]
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "html/types/**/*.ts"],
"exclude": ["node_modules"]
}

Loading…
Cancel
Save