main
fadeaway 6 months ago
parent 6432c78af2
commit 093587650e

@ -5,7 +5,7 @@
import { useState, useEffect, useMemo } from 'react';
import ImageWithBasePath from '@/components/ImageWithBasePath';
import Image from 'next/image';
// 获取文章信息
async function getArticleInfo(journalId: string) {
@ -44,13 +44,7 @@ export default function Article() {
)}
{articleInfo?.image && (
<div className="relative w-[100%] aspect-square mt-[18px]">
<ImageWithBasePath
className="rounded-[6px] object-cover"
unoptimized
fill
src={articleInfo?.image}
alt="cover"
/>
<Image className="rounded-[6px] object-cover" unoptimized fill src={articleInfo?.image} alt="cover" />
</div>
)}
{articleInfo?.content && (

@ -5,8 +5,9 @@
import { useEffect, useState } from 'react';
import Image from 'next/image';
import ArticalWrap from '@/components/ArticalWrap';
import ImageWithBasePath from '@/components/ImageWithBasePath';
import JournalComment from '@/components/JournalComment';
import SongList from '@/components/SongList';
@ -60,7 +61,7 @@ export default function JournalContent() {
<div className={`w-full flex-1 flex-col ${loading ? 'hidden' : 'flex'}`}>
{/* 期刊封面图 */}
<div className="relative w-[100%] h-[264.84px]">
<ImageWithBasePath className="object-cover" unoptimized fill src={journalInfo?.image} alt="journal-cover" />
<Image className="object-cover" unoptimized fill src={journalInfo?.image} alt="journal-cover" />
</div>
<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]">

@ -2,6 +2,8 @@
import { useState, useRef, useEffect } from 'react';
import Image from 'next/image';
import AudioPlayer from '@/components/AudioPlayer';
import type { IAudioPlayerRef } from '@/components/AudioPlayer';
import ImageWithBasePath from '@/components/ImageWithBasePath';
@ -59,13 +61,7 @@ export default function MusicPanel() {
<div className={`w-full ${loading && 'invisible'}`}>
<div className="relative w-[100%] aspect-square mt-[12px]">
{musicInfo?.pic && (
<ImageWithBasePath
className="rounded-[6px] object-cover"
unoptimized
fill
src={musicInfo?.pic}
alt="cover"
/>
<Image className="rounded-[6px] object-cover" unoptimized fill src={musicInfo?.pic} alt="cover" />
)}
<ImageWithBasePath
className={`absolute top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] w-[60px] h-[60px] ${!playing && 'hidden'}`}

@ -1,6 +1,7 @@
'use client';
// import { useRouter } from 'next/navigation';
import Image from 'next/image';
import ImageWithBasePath from '@/components/ImageWithBasePath';
@ -36,7 +37,7 @@ export default function SongItem(props: { data: ISong }) {
return (
<div className="flex items-center py-[12px]">
<ImageWithBasePath
<Image
className="w-[48px] h-[48px] rounded-[3px]"
width={48}
height={48}

Loading…
Cancel
Save