|
@@ -17,7 +17,7 @@ router.get('/:channel', function(req, res, next) {
|
|
|
|
|
|
// console.log(req)
|
|
// console.log(req)
|
|
let config = {
|
|
let config = {
|
|
- path: links[channel],
|
|
|
|
|
|
+ path: links[channel] || '/weapi/v3/song/detail',
|
|
params: {
|
|
params: {
|
|
"ids": [id],
|
|
"ids": [id],
|
|
"br": 999000,
|
|
"br": 999000,
|
|
@@ -54,9 +54,8 @@ router.get('/:channel', function(req, res, next) {
|
|
}
|
|
}
|
|
util.requestServer(config).then(ret => {
|
|
util.requestServer(config).then(ret => {
|
|
if (channel == 'song') {
|
|
if (channel == 'song') {
|
|
-
|
|
|
|
let songs = ret.songs
|
|
let songs = ret.songs
|
|
- if (songs.length) {
|
|
|
|
|
|
+ if (song && songs.length) {
|
|
config['path'] = links.song_url
|
|
config['path'] = links.song_url
|
|
config['params'] = {
|
|
config['params'] = {
|
|
"ids": [id],
|
|
"ids": [id],
|