fix: 修复mini播放栏主题颜色问题 将mini播放栏设为默认

This commit is contained in:
alger
2025-10-22 21:49:53 +08:00
parent 316d5932e3
commit bee5445b6e
4 changed files with 3 additions and 279 deletions

View File

@@ -75,7 +75,6 @@ import { computed, onMounted, ref, watch } from 'vue';
import { allTime, nowTime, playMusic } from '@/hooks/MusicHook';
import { audioService } from '@/services/audioService';
import { usePlayerStore } from '@/store/modules/player';
import { useSettingsStore } from '@/store/modules/settings';
import { secondToMinute } from '@/utils';
const props = withDefaults(
@@ -88,7 +87,6 @@ const props = withDefaults(
);
const playerStore = usePlayerStore();
const settingsStore = useSettingsStore();
const playBarRef = ref<HTMLElement | null>(null);
// 播放状态
@@ -183,7 +181,7 @@ const openPlayListDrawer = () => {
};
// 深色模式
const isDarkMode = computed(() => settingsStore.theme === 'dark' || props.isDark);
const isDarkMode = computed(() => props.isDark);
// 主题颜色应用函数
const applyThemeColor = (colorValue: string) => {

View File

@@ -1,14 +0,0 @@
export interface ILyric {
sgc: boolean;
sfy: boolean;
qfy: boolean;
lrc: Lrc;
klyric: Lrc;
tlyric: Lrc;
code: number;
}
interface Lrc {
version: number;
lyric: string;
}

View File

@@ -1,260 +0,0 @@
export interface IRecommendMusic {
code: number;
category: number;
result: SongResult[];
}
export interface ILyricText {
text: string;
trText: string;
}
export interface ILyric {
lrcTimeArray: number[];
lrcArray: ILyricText[];
}
export interface SongResult {
id: string | number;
name: string;
picUrl: string;
playCount?: number;
song?: any;
copywriter?: string;
type?: number;
canDislike?: boolean;
program?: any;
alg?: string;
ar: Artist[];
artists?: Artist[];
al: Album;
album?: Album;
count: number;
playMusicUrl?: string;
playLoading?: boolean;
lyric?: ILyric;
backgroundColor?: string;
primaryColor?: string;
bilibiliData?: {
bvid: string;
cid: number;
};
source?: 'netease' | 'bilibili';
// 过期时间
expiredAt?: number;
// 获取时间
createdAt?: number;
// 时长
duration?: number;
dt?: number;
isFirstPlay?: boolean;
}
export interface Song {
name: string;
id: number;
position: number;
alias: string[];
status: number;
fee: number;
copyrightId: number;
disc: string;
no: number;
artists: Artist[];
album: Album;
starred: boolean;
popularity: number;
score: number;
starredNum: number;
duration: number;
playedNum: number;
dayPlays: number;
hearTime: number;
ringtone: string;
crbt?: any;
audition?: any;
copyFrom: string;
commentThreadId: string;
rtUrl?: any;
ftype: number;
rtUrls: any[];
copyright: number;
transName?: any;
sign?: any;
mark: number;
originCoverType: number;
originSongSimpleData?: any;
single: number;
noCopyrightRcmd?: any;
rtype: number;
rurl?: any;
mvid: number;
bMusic: BMusic;
mp3Url?: any;
hMusic: BMusic;
mMusic: BMusic;
lMusic: BMusic;
exclusive: boolean;
privilege: Privilege;
count?: number;
playLoading?: boolean;
picUrl?: string;
ar: Artist[];
}
interface Privilege {
id: number;
fee: number;
payed: number;
st: number;
pl: number;
dl: number;
sp: number;
cp: number;
subp: number;
cs: boolean;
maxbr: number;
fl: number;
toast: boolean;
flag: number;
preSell: boolean;
playMaxbr: number;
downloadMaxbr: number;
rscl?: any;
freeTrialPrivilege: FreeTrialPrivilege;
chargeInfoList: ChargeInfoList[];
}
interface ChargeInfoList {
rate: number;
chargeUrl?: any;
chargeMessage?: any;
chargeType: number;
}
interface FreeTrialPrivilege {
resConsumable: boolean;
userConsumable: boolean;
}
interface BMusic {
name?: any;
id: number;
size: number;
extension: string;
sr: number;
dfsId: number;
bitrate: number;
playTime: number;
volumeDelta: number;
}
interface Album {
name: string;
id: number;
type: string;
size: number;
picId: number;
blurPicUrl: string;
companyId: number;
pic: number;
picUrl: string;
publishTime: number;
description: string;
tags: string;
company: string;
briefDesc: string;
artist: Artist;
songs: any[];
alias: string[];
status: number;
copyrightId: number;
commentThreadId: string;
artists: Artist[];
subType: string;
transName?: any;
onSale: boolean;
mark: number;
picId_str: string;
}
export interface Artist {
name: string;
id: number;
picId: number;
img1v1Id: number;
briefDesc: string;
picUrl: string;
img1v1Url: string;
albumSize: number;
alias: any[];
trans: string;
musicSize: number;
topicPerson: number;
}
export interface IPlayMusicUrl {
data: Datum[];
code: number;
}
interface Datum {
id: number;
url: string;
br: number;
size: number;
md5: string;
code: number;
expi: number;
type: string;
gain: number;
fee: number;
uf?: any;
payed: number;
flag: number;
canExtend: boolean;
freeTrialInfo?: any;
level: string;
encodeType: string;
freeTrialPrivilege: FreeTrialPrivilege;
freeTimeTrialPrivilege: FreeTimeTrialPrivilege;
urlSource: number;
}
interface FreeTimeTrialPrivilege {
resConsumable: boolean;
userConsumable: boolean;
type: number;
remainTime: number;
}
interface FreeTrialPrivilege {
resConsumable: boolean;
userConsumable: boolean;
}
export interface IArtists {
id: number;
name: string;
picUrl: string | null;
alias: string[];
albumSize: number;
picId: number;
fansGroup: null;
img1v1Url: string;
img1v1: number;
trans: null;
}
// 音乐源类型定义
export type MusicSourceType =
| 'tencent'
| 'kugou'
| 'migu'
| 'netease'
| 'joox'
| 'ytmusic'
| 'spotify'
| 'qobuz'
| 'deezer'
| 'gdmusic';
// 更多音乐相关的类型可以在这里定义

View File

@@ -25,8 +25,8 @@ export const DEFAULT_LYRIC_CONFIG: LyricConfig = {
lineHeight: 2,
showTranslation: true,
theme: 'default',
hidePlayBar: false,
hideMiniPlayBar: true,
hidePlayBar: true,
hideMiniPlayBar: false,
pureModeEnabled: false,
hideLyrics: false,
// 移动端默认配置