@@ -306,8 +306,8 @@ import { mapState, mapMutations, mapActions } from 'vuex';
306306import VueSlider from ' vue-slider-component' ;
307307import ContextMenu from ' @/components/ContextMenu.vue' ;
308308import { formatTrackTime } from ' @/utils/common' ;
309- import { getLyric } from ' @/api/track' ;
310- import { lyricParser , copyLyric } from ' @/utils/lyrics' ;
309+ import { getLyric , getCloudLyric } from ' @/api/track' ;
310+ import { lyricParser , copyLyric , parseLyric } from ' @/utils/lyrics' ;
311311import ButtonIcon from ' @/components/ButtonIcon.vue' ;
312312import * as Vibrant from ' node-vibrant/dist/vibrant.worker.min.js' ;
313313import Color from ' color' ;
@@ -544,6 +544,23 @@ export default {
544544 },
545545 getLyric () {
546546 if (! this .currentTrack .id ) return ;
547+ if (
548+ this .currentTrack .pc !== null &&
549+ this .currentTrack .cd === null &&
550+ this .$store .state .data .user ? .userId
551+ ) {
552+ // 云盘未设置关联的歌曲获取其内置歌词
553+ return getCloudLyric (
554+ this .currentTrack .id ,
555+ this .$store .state .data .user ? .userId
556+ ).then (data => {
557+ this .tlyric = [];
558+ this .romalyric = [];
559+ this .lyric = data? .lrc ? .length > 0 ? parseLyric (data .lrc ) : [];
560+ this .lyricType = ' translation' ;
561+ return true ;
562+ });
563+ }
547564 return getLyric (this .currentTrack .id ).then (data => {
548565 if (! data? .lrc ? .lyric ) {
549566 this .lyric = [];
@@ -708,6 +725,7 @@ export default {
708725 position: absolute;
709726 height: 100vh ;
710727 width: 100vw ;
728+
711729 .top - right,
712730 .bottom - left {
713731 z- index: 0 ;
@@ -740,6 +758,7 @@ export default {
740758 0 % {
741759 transform: rotate (0deg );
742760 }
761+
743762 100 % {
744763 transform: rotate (360deg );
745764 }
@@ -814,6 +833,7 @@ export default {
814833 margin: 0 10px ;
815834 display: flex;
816835 align- items: center;
836+
817837 .volume - bar {
818838 width: 84px ;
819839 }
@@ -895,6 +915,7 @@ export default {
895915 width: 22px ;
896916 }
897917 }
918+
898919 .lyric - switch -icon {
899920 color: var (-- color- text);
900921 font- size: 14px ;
@@ -990,6 +1011,7 @@ export default {
9901011
9911012 .highlight div .content {
9921013 transform: scale (1 );
1014+
9931015 span {
9941016 opacity: 0.98 ;
9951017 display: inline- block;
@@ -1054,6 +1076,7 @@ export default {
10541076 .left - side {
10551077 display: none;
10561078 }
1079+
10571080 .right - side .lyrics - container {
10581081 max- width: 100 % ;
10591082 }
@@ -1070,7 +1093,10 @@ export default {
10701093 transition: all 0 .4s ;
10711094}
10721095
1073- .slide - up- enter, .slide - up- leave- to /* .fade-leave-active below version 2.1.8 */ {
1096+ .slide - up- enter,
1097+ .slide - up- leave- to
1098+
1099+ /* .fade-leave-active below version 2.1.8 */ {
10741100 transform: translateY (100 % );
10751101}
10761102
0 commit comments