mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
fix: bugs (#1579)
* fix: 让从本地缓存获取的音乐可以拖动进度条 * fix: 登陆二维码使用SVG & 二维码支持强调色 * fix: 搜索页面在没有取得结果不再白屏 * fix: 避免私人FM出现相同的歌曲连着出现 * fix: 给部分api添加时间戳参数 因为发现无法获取个性化推荐歌单,添加时间戳后成功获取 * 改用`Date.now()` * 将个性化推荐放在推荐歌单的前面
This commit is contained in:
parent
07d7564b1e
commit
4d59401549
7 changed files with 41 additions and 14 deletions
|
|
@ -98,7 +98,7 @@ const Search = () => {
|
|||
|
||||
const handlePlayTracks = useCallback(
|
||||
(trackID: number | null = null) => {
|
||||
const tracks = searchResult?.result.song.songs
|
||||
const tracks = searchResult?.result?.song?.songs
|
||||
if (!tracks?.length) {
|
||||
toast('无法播放歌单')
|
||||
return
|
||||
|
|
@ -108,7 +108,7 @@ const Search = () => {
|
|||
trackID
|
||||
)
|
||||
},
|
||||
[searchResult?.result.song.songs]
|
||||
[searchResult?.result?.song?.songs]
|
||||
)
|
||||
|
||||
const navigate = useNavigate()
|
||||
|
|
@ -163,21 +163,21 @@ const Search = () => {
|
|||
|
||||
{/* Search result */}
|
||||
<div className='grid grid-cols-2 gap-6'>
|
||||
{searchResult?.result.artist.artists && (
|
||||
{searchResult?.result?.artist?.artists && (
|
||||
<div>
|
||||
<div className='mb-2 text-sm font-medium text-gray-400'>艺人</div>
|
||||
<Artists artists={searchResult.result.artist.artists} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{searchResult?.result.album.albums && (
|
||||
{searchResult?.result?.album?.albums && (
|
||||
<div>
|
||||
<div className='mb-2 text-sm font-medium text-gray-400'>专辑</div>
|
||||
<Albums albums={searchResult.result.album.albums} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{searchResult?.result.song.songs && (
|
||||
{searchResult?.result?.song?.songs && (
|
||||
<div className='col-span-2'>
|
||||
<div className='mb-2 text-sm font-medium text-gray-400'>歌曲</div>
|
||||
<TrackGrid
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue