fix(歌曲请求站): 修复歌曲切换逻辑并优化音频管理
修复fastForward函数逻辑,改为按标签切换歌曲而非时间跳转 调整clickSongs函数,传递标签信息用于后续歌曲管理 移除调试用的console.log语句 统一代码格式,如引号风格和分号使用
This commit is contained in:
@@ -211,6 +211,8 @@ createApp({
|
||||
const src = playData.value?.playurl || "";
|
||||
const area = playData.value?.area || "";
|
||||
|
||||
console.log(audioPlayer.value.src, src);
|
||||
|
||||
if (audioPlayer.value.src != src) {
|
||||
manageAudio(src, area);
|
||||
return;
|
||||
@@ -524,12 +526,11 @@ createApp({
|
||||
else getPlayUrl(index, area);
|
||||
};
|
||||
|
||||
|
||||
// 监听 previewState 如果为 true body.style.overflow = 'hidden'
|
||||
watch(previewState, (newVal) => {
|
||||
if (newVal) document.body.style.overflow = 'hidden';
|
||||
else document.body.style.overflow = 'auto';
|
||||
})
|
||||
if (newVal) document.body.style.overflow = "hidden";
|
||||
else document.body.style.overflow = "auto";
|
||||
});
|
||||
|
||||
return { judgmentPlayUrl, cutSong, getPlayUrl, handleBarDragBottomClick, startBarDragBottom, volumeShow, handleVolumeHide, handleVolumeShow, zeroOrderStudents, rePlay, playData, awardAudioList, changeInterval, awardMVList, bannerList, albumBoxRef, volume, handleVolumeClick, handleVolumeDrag, startDrag, stopDrag, volume, cutStudent, studentList, studentIndex, scrollToPrevious, scrollToNext, changePointer, pointerIndex, visibleRef, studentRef, customRef, formatTime, currentTimeFormatted, durationFormatted, worksRef, introduceRef, customList, closeAll, manageAudio, progress, closePreview, openPreview, previewState, audioPlayer, trait, fastForward };
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user