File tree 2 files changed +9
-2
lines changed 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ export default {
50
50
props: {
51
51
items: { type: Array , required: true },
52
52
type: { type: String , required: true },
53
- subText: { type: String , default: ' null ' },
53
+ subText: { type: String , default: ' none ' },
54
54
subTextFontSize: { type: String , default: ' 16px' },
55
55
showPlayCount: { type: Boolean , default: false },
56
56
columnNumber: { type: Number , default: 5 },
Original file line number Diff line number Diff line change @@ -185,6 +185,7 @@ import {
185
185
followAArtist ,
186
186
similarArtists ,
187
187
} from ' @/api/artist' ;
188
+ import { getTrackDetail } from ' @/api/track' ;
188
189
import locale from ' @/locale' ;
189
190
import { isAccountLoggedIn } from ' @/utils/auth' ;
190
191
import NProgress from ' nprogress' ;
@@ -278,7 +279,7 @@ export default {
278
279
this .$parent .$refs .main .scrollTo ({ top: 0 });
279
280
getArtist (id).then (data => {
280
281
this .artist = data .artist ;
281
- this .popularTracks = data .hotSongs ;
282
+ this .setPopularTracks ( data .hotSongs ) ;
282
283
if (next !== undefined ) next ();
283
284
NProgress .done ();
284
285
this .show = true ;
@@ -295,6 +296,12 @@ export default {
295
296
this .similarArtists = data .artists ;
296
297
});
297
298
},
299
+ setPopularTracks (hotSongs ) {
300
+ const trackIDs = hotSongs .map (t => t .id );
301
+ getTrackDetail (trackIDs .join (' ,' )).then (data => {
302
+ this .popularTracks = data .songs ;
303
+ });
304
+ },
298
305
goToAlbum (id ) {
299
306
this .$router .push ({
300
307
name: ' album' ,
You can’t perform that action at this time.
0 commit comments