@sansenjian/qq-music-api 1.0.6 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +2 -2
- package/.dockerignore +5 -5
- package/.editorconfig +31 -31
- package/.eslintrc.json +21 -17
- package/.github/FUNDING.yml +12 -12
- package/.github/ISSUE_TEMPLATE/bug_report.md +38 -38
- package/.github/ISSUE_TEMPLATE/custom.md +24 -24
- package/.github/ISSUE_TEMPLATE/feature_request.md +20 -20
- package/.github/workflows/publish.yml +26 -0
- package/.husky/commit-msg +1 -0
- package/.husky/pre-commit +1 -0
- package/.prettierignore +1 -1
- package/.prettierrc +9 -9
- package/CHANGELOG.md +70 -70
- package/Dockerfile +18 -18
- package/LICENSE +21 -21
- package/README.md +218 -177
- package/app.js +75 -75
- package/commitlint.config.js +20 -20
- package/config/user-info.js +42 -42
- package/index.js +1 -1
- package/middlewares/koa-cors.js +97 -97
- package/module/apis/UCommon/UCommon.js +6 -6
- package/module/apis/album/getAlbumInfo.js +33 -33
- package/module/apis/comments/getComments.js +35 -35
- package/module/apis/digitalAlbum/getDigitalAlbumLists.js +34 -34
- package/module/apis/downloadQQMusic.js +41 -41
- package/module/apis/music/getLyric.js +42 -41
- package/module/apis/mv/getMvByTag.js +35 -35
- package/module/apis/radio/getRadioLists.js +38 -38
- package/module/apis/rank/getTopLists.js +44 -44
- package/module/apis/search/getHotKey.js +35 -35
- package/module/apis/search/getSearchByKey.js +45 -45
- package/module/apis/search/getSmartbox.js +34 -34
- package/module/apis/singers/getSimilarSinger.js +36 -36
- package/module/apis/singers/getSingerDesc.js +38 -38
- package/module/apis/singers/getSingerMv.js +35 -35
- package/module/apis/singers/getSingerStarNum.js +36 -36
- package/module/apis/songLists/songListCategories.js +33 -33
- package/module/apis/songLists/songListDetail.js +38 -38
- package/module/apis/songLists/songLists.js +41 -41
- package/module/apis/u_common.js +17 -16
- package/module/apis/user/checkQQLoginQr.js +125 -86
- package/module/apis/user/getQQLoginQr.js +17 -11
- package/module/apis/y_common.js +27 -14
- package/module/config.js +31 -31
- package/module/index.js +82 -82
- package/package.json +72 -83
- package/public/index.html +47 -47
- package/routers/context/batchGetSongInfo.js +59 -59
- package/routers/context/batchGetSongLists.js +50 -50
- package/routers/context/checkQQLoginQr.js +17 -15
- package/routers/context/cookies.js +36 -36
- package/routers/context/getAlbumInfo.js +27 -27
- package/routers/context/getComments.js +51 -51
- package/routers/context/getDigitalAlbumLists.js +14 -14
- package/routers/context/getDownloadQQMusic.js +14 -14
- package/routers/context/getHotkey.js +14 -14
- package/routers/context/getImageUrl.js +34 -34
- package/routers/context/getLyric.js +26 -26
- package/routers/context/getMusicPlay.js +116 -112
- package/routers/context/getMv.js +56 -56
- package/routers/context/getMvByTag.js +15 -15
- package/routers/context/getMvPlay.js +128 -118
- package/routers/context/getNewDisks.js +50 -51
- package/routers/context/getQQLoginQr.js +12 -12
- package/routers/context/getRadioLists.js +14 -14
- package/routers/context/getRanks.js +90 -86
- package/routers/context/getRecommend.js +86 -86
- package/routers/context/getSearchByKey.js +32 -32
- package/routers/context/getSimilarSinger.js +25 -25
- package/routers/context/getSingerAlbum.js +52 -52
- package/routers/context/getSingerDesc.js +25 -25
- package/routers/context/getSingerHotsong.js +52 -52
- package/routers/context/getSingerList.js +51 -52
- package/routers/context/getSingerMv.js +32 -32
- package/routers/context/getSingerStarNum.js +24 -24
- package/routers/context/getSmartbox.js +24 -24
- package/routers/context/getSongInfo.js +49 -49
- package/routers/context/getSongListCategories.js +22 -22
- package/routers/context/getSongListDetail.js +25 -25
- package/routers/context/getSongLists.js +32 -32
- package/routers/context/getTicketInfo.js +45 -45
- package/routers/context/getTopLists.js +15 -15
- package/routers/context/index.js +74 -74
- package/routers/router.js +116 -112
- package/scripts/build-images.js +36 -36
- package/scripts/commit-push.sh +103 -103
- package/util/colors.js +16 -16
- package/util/cookie.js +22 -22
- package/util/loginUtils.js +28 -23
- package/util/lyricParse.js +64 -64
- package/util/request.js +57 -57
- package/vercel.json +15 -15
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
const { UCommon } = require('../../module');
|
|
2
|
-
|
|
3
|
-
// singermid=0025NhlN2yWrP4
|
|
4
|
-
module.exports = async (ctx, next) => {
|
|
5
|
-
const singermid = ctx.query.singermid;
|
|
6
|
-
const num = +ctx.query.limit || 5;
|
|
7
|
-
const begin = +ctx.query.page || 0;
|
|
8
|
-
const data = {
|
|
9
|
-
comm: {
|
|
10
|
-
ct: 24,
|
|
11
|
-
cv: 0,
|
|
12
|
-
},
|
|
13
|
-
singer: {
|
|
14
|
-
method: 'GetAlbumList',
|
|
15
|
-
param: {
|
|
16
|
-
sort: 5,
|
|
17
|
-
singermid,
|
|
18
|
-
begin,
|
|
19
|
-
num,
|
|
20
|
-
},
|
|
21
|
-
module: 'music.musichallAlbum.AlbumListServer',
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
const params = Object.assign({
|
|
25
|
-
format: 'json',
|
|
26
|
-
singermid,
|
|
27
|
-
data: JSON.stringify(data),
|
|
28
|
-
});
|
|
29
|
-
const props = {
|
|
30
|
-
method: 'get',
|
|
31
|
-
params,
|
|
32
|
-
option: {},
|
|
33
|
-
};
|
|
34
|
-
if (singermid) {
|
|
35
|
-
await UCommon(props)
|
|
36
|
-
.then(res => {
|
|
37
|
-
const response = res.data;
|
|
38
|
-
ctx.status = 200;
|
|
39
|
-
ctx.body = {
|
|
40
|
-
response,
|
|
41
|
-
};
|
|
42
|
-
})
|
|
43
|
-
.catch(error => {
|
|
44
|
-
console.log('error', error);
|
|
45
|
-
});
|
|
46
|
-
} else {
|
|
47
|
-
ctx.status = 400;
|
|
48
|
-
ctx.body = {
|
|
49
|
-
response: 'no singermid',
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
};
|
|
1
|
+
const { UCommon } = require('../../module');
|
|
2
|
+
|
|
3
|
+
// singermid=0025NhlN2yWrP4
|
|
4
|
+
module.exports = async (ctx, next) => {
|
|
5
|
+
const singermid = ctx.query.singermid;
|
|
6
|
+
const num = +ctx.query.limit || 5;
|
|
7
|
+
const begin = +ctx.query.page || 0;
|
|
8
|
+
const data = {
|
|
9
|
+
comm: {
|
|
10
|
+
ct: 24,
|
|
11
|
+
cv: 0,
|
|
12
|
+
},
|
|
13
|
+
singer: {
|
|
14
|
+
method: 'GetAlbumList',
|
|
15
|
+
param: {
|
|
16
|
+
sort: 5,
|
|
17
|
+
singermid,
|
|
18
|
+
begin,
|
|
19
|
+
num,
|
|
20
|
+
},
|
|
21
|
+
module: 'music.musichallAlbum.AlbumListServer',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
const params = Object.assign({
|
|
25
|
+
format: 'json',
|
|
26
|
+
singermid,
|
|
27
|
+
data: JSON.stringify(data),
|
|
28
|
+
});
|
|
29
|
+
const props = {
|
|
30
|
+
method: 'get',
|
|
31
|
+
params,
|
|
32
|
+
option: {},
|
|
33
|
+
};
|
|
34
|
+
if (singermid) {
|
|
35
|
+
await UCommon(props)
|
|
36
|
+
.then(res => {
|
|
37
|
+
const response = res.data;
|
|
38
|
+
ctx.status = 200;
|
|
39
|
+
ctx.body = {
|
|
40
|
+
response,
|
|
41
|
+
};
|
|
42
|
+
})
|
|
43
|
+
.catch(error => {
|
|
44
|
+
console.log('error', error);
|
|
45
|
+
});
|
|
46
|
+
} else {
|
|
47
|
+
ctx.status = 400;
|
|
48
|
+
ctx.body = {
|
|
49
|
+
response: 'no singermid',
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
const { getSingerDesc } = require('../../module');
|
|
2
|
-
|
|
3
|
-
module.exports = async (ctx, next) => {
|
|
4
|
-
const { singermid } = ctx.query;
|
|
5
|
-
const props = {
|
|
6
|
-
method: 'get',
|
|
7
|
-
params: {
|
|
8
|
-
singermid,
|
|
9
|
-
},
|
|
10
|
-
option: {},
|
|
11
|
-
};
|
|
12
|
-
if (singermid) {
|
|
13
|
-
const { status, body } = await getSingerDesc(props);
|
|
14
|
-
Object.assign(ctx, {
|
|
15
|
-
status,
|
|
16
|
-
body,
|
|
17
|
-
});
|
|
18
|
-
} else {
|
|
19
|
-
ctx.status = 400;
|
|
20
|
-
ctx.body = {
|
|
21
|
-
status: 400,
|
|
22
|
-
response: 'no singermid',
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
};
|
|
1
|
+
const { getSingerDesc } = require('../../module');
|
|
2
|
+
|
|
3
|
+
module.exports = async (ctx, next) => {
|
|
4
|
+
const { singermid } = ctx.query;
|
|
5
|
+
const props = {
|
|
6
|
+
method: 'get',
|
|
7
|
+
params: {
|
|
8
|
+
singermid,
|
|
9
|
+
},
|
|
10
|
+
option: {},
|
|
11
|
+
};
|
|
12
|
+
if (singermid) {
|
|
13
|
+
const { status, body } = await getSingerDesc(props);
|
|
14
|
+
Object.assign(ctx, {
|
|
15
|
+
status,
|
|
16
|
+
body,
|
|
17
|
+
});
|
|
18
|
+
} else {
|
|
19
|
+
ctx.status = 400;
|
|
20
|
+
ctx.body = {
|
|
21
|
+
status: 400,
|
|
22
|
+
response: 'no singermid',
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
const { UCommon } = require('../../module');
|
|
2
|
-
|
|
3
|
-
// singermid=0025NhlN2yWrP4
|
|
4
|
-
module.exports = async (ctx, next) => {
|
|
5
|
-
const singermid = ctx.query.singermid;
|
|
6
|
-
const num = +ctx.query.limit || 5;
|
|
7
|
-
const page = +ctx.query.page || 0;
|
|
8
|
-
const data = {
|
|
9
|
-
comm: {
|
|
10
|
-
ct: 24,
|
|
11
|
-
cv: 0,
|
|
12
|
-
},
|
|
13
|
-
singer: {
|
|
14
|
-
method: 'get_singer_detail_info',
|
|
15
|
-
param: {
|
|
16
|
-
sort: 5,
|
|
17
|
-
singermid,
|
|
18
|
-
sin: (page - 1) * num,
|
|
19
|
-
num,
|
|
20
|
-
},
|
|
21
|
-
module: 'music.web_singer_info_svr',
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
const params = Object.assign({
|
|
25
|
-
format: 'json',
|
|
26
|
-
singermid,
|
|
27
|
-
data: JSON.stringify(data),
|
|
28
|
-
});
|
|
29
|
-
const props = {
|
|
30
|
-
method: 'get',
|
|
31
|
-
params,
|
|
32
|
-
option: {},
|
|
33
|
-
};
|
|
34
|
-
if (singermid) {
|
|
35
|
-
await UCommon(props)
|
|
36
|
-
.then(res => {
|
|
37
|
-
const response = res.data;
|
|
38
|
-
ctx.status = 200;
|
|
39
|
-
ctx.body = {
|
|
40
|
-
response,
|
|
41
|
-
};
|
|
42
|
-
})
|
|
43
|
-
.catch(error => {
|
|
44
|
-
console.log('error', error);
|
|
45
|
-
});
|
|
46
|
-
} else {
|
|
47
|
-
ctx.status = 400;
|
|
48
|
-
ctx.body = {
|
|
49
|
-
response: 'no singermid',
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
};
|
|
1
|
+
const { UCommon } = require('../../module');
|
|
2
|
+
|
|
3
|
+
// singermid=0025NhlN2yWrP4
|
|
4
|
+
module.exports = async (ctx, next) => {
|
|
5
|
+
const singermid = ctx.query.singermid;
|
|
6
|
+
const num = +ctx.query.limit || 5;
|
|
7
|
+
const page = +ctx.query.page || 0;
|
|
8
|
+
const data = {
|
|
9
|
+
comm: {
|
|
10
|
+
ct: 24,
|
|
11
|
+
cv: 0,
|
|
12
|
+
},
|
|
13
|
+
singer: {
|
|
14
|
+
method: 'get_singer_detail_info',
|
|
15
|
+
param: {
|
|
16
|
+
sort: 5,
|
|
17
|
+
singermid,
|
|
18
|
+
sin: (page - 1) * num,
|
|
19
|
+
num,
|
|
20
|
+
},
|
|
21
|
+
module: 'music.web_singer_info_svr',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
const params = Object.assign({
|
|
25
|
+
format: 'json',
|
|
26
|
+
singermid,
|
|
27
|
+
data: JSON.stringify(data),
|
|
28
|
+
});
|
|
29
|
+
const props = {
|
|
30
|
+
method: 'get',
|
|
31
|
+
params,
|
|
32
|
+
option: {},
|
|
33
|
+
};
|
|
34
|
+
if (singermid) {
|
|
35
|
+
await UCommon(props)
|
|
36
|
+
.then(res => {
|
|
37
|
+
const response = res.data;
|
|
38
|
+
ctx.status = 200;
|
|
39
|
+
ctx.body = {
|
|
40
|
+
response,
|
|
41
|
+
};
|
|
42
|
+
})
|
|
43
|
+
.catch(error => {
|
|
44
|
+
console.log('error', error);
|
|
45
|
+
});
|
|
46
|
+
} else {
|
|
47
|
+
ctx.status = 400;
|
|
48
|
+
ctx.body = {
|
|
49
|
+
response: 'no singermid',
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
};
|
|
@@ -1,52 +1,51 @@
|
|
|
1
|
-
const { UCommon } = require('../../module');
|
|
2
|
-
const {
|
|
3
|
-
|
|
4
|
-
// -100 默认值 all
|
|
5
|
-
// area [1 - 6]
|
|
6
|
-
// sex 0 男 1 女 2 组合
|
|
7
|
-
// genre [1 - 20]
|
|
8
|
-
// index a-z # 1-27
|
|
9
|
-
module.exports = async (ctx, next) => {
|
|
10
|
-
const { area = -100, sex = -100, genre = -100, index = -100, page = 1 } = ctx.query;
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
ctx.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
};
|
|
1
|
+
const { UCommon } = require('../../module');
|
|
2
|
+
const { commonParams } = require('../../module/config');
|
|
3
|
+
|
|
4
|
+
// -100 默认值 all
|
|
5
|
+
// area [1 - 6]
|
|
6
|
+
// sex 0 男 1 女 2 组合
|
|
7
|
+
// genre [1 - 20]
|
|
8
|
+
// index a-z # 1-27
|
|
9
|
+
module.exports = async (ctx, next) => {
|
|
10
|
+
const { area = -100, sex = -100, genre = -100, index = -100, page = 1 } = ctx.query;
|
|
11
|
+
const data = {
|
|
12
|
+
comm: {
|
|
13
|
+
ct: 24,
|
|
14
|
+
cv: 0,
|
|
15
|
+
},
|
|
16
|
+
singerList: {
|
|
17
|
+
module: 'Music.SingerListServer',
|
|
18
|
+
method: 'get_singer_list',
|
|
19
|
+
param: {
|
|
20
|
+
area: +area,
|
|
21
|
+
sex: +sex,
|
|
22
|
+
genre: +genre,
|
|
23
|
+
index: +index,
|
|
24
|
+
sin: (page - 1) * 80,
|
|
25
|
+
cur_page: +page,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
const params = Object.assign(commonParams, {
|
|
30
|
+
format: 'json',
|
|
31
|
+
data: JSON.stringify(data),
|
|
32
|
+
});
|
|
33
|
+
const props = {
|
|
34
|
+
method: 'get',
|
|
35
|
+
params,
|
|
36
|
+
option: {},
|
|
37
|
+
};
|
|
38
|
+
await UCommon(props)
|
|
39
|
+
.then(res => {
|
|
40
|
+
console.log(res);
|
|
41
|
+
const response = res.data;
|
|
42
|
+
ctx.status = 200;
|
|
43
|
+
ctx.body = {
|
|
44
|
+
status: 200,
|
|
45
|
+
response,
|
|
46
|
+
};
|
|
47
|
+
})
|
|
48
|
+
.catch(error => {
|
|
49
|
+
console.log('error', error);
|
|
50
|
+
});
|
|
51
|
+
};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
const { getSingerMv } = require('../../module');
|
|
2
|
-
|
|
3
|
-
module.exports = async (ctx, next) => {
|
|
4
|
-
const { singermid, order, num = 5 } = ctx.query;
|
|
5
|
-
|
|
6
|
-
singermid,
|
|
7
|
-
order,
|
|
8
|
-
num,
|
|
9
|
-
});
|
|
10
|
-
if (order && order.toLowerCase() === 'time') {
|
|
11
|
-
params = Object.assign(params, {
|
|
12
|
-
cmd: 1,
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
const props = {
|
|
16
|
-
method: 'get',
|
|
17
|
-
params,
|
|
18
|
-
option: {},
|
|
19
|
-
};
|
|
20
|
-
if (singermid) {
|
|
21
|
-
const { status, body } = await getSingerMv(props);
|
|
22
|
-
Object.assign(ctx, {
|
|
23
|
-
status,
|
|
24
|
-
body,
|
|
25
|
-
});
|
|
26
|
-
} else {
|
|
27
|
-
ctx.status = 400;
|
|
28
|
-
ctx.body = {
|
|
29
|
-
response: 'no singermid',
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
};
|
|
1
|
+
const { getSingerMv } = require('../../module');
|
|
2
|
+
|
|
3
|
+
module.exports = async (ctx, next) => {
|
|
4
|
+
const { singermid, order, num = 5 } = ctx.query;
|
|
5
|
+
let params = Object.assign({
|
|
6
|
+
singermid,
|
|
7
|
+
order,
|
|
8
|
+
num,
|
|
9
|
+
});
|
|
10
|
+
if (order && order.toLowerCase() === 'time') {
|
|
11
|
+
params = Object.assign(params, {
|
|
12
|
+
cmd: 1,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
const props = {
|
|
16
|
+
method: 'get',
|
|
17
|
+
params,
|
|
18
|
+
option: {},
|
|
19
|
+
};
|
|
20
|
+
if (singermid) {
|
|
21
|
+
const { status, body } = await getSingerMv(props);
|
|
22
|
+
Object.assign(ctx, {
|
|
23
|
+
status,
|
|
24
|
+
body,
|
|
25
|
+
});
|
|
26
|
+
} else {
|
|
27
|
+
ctx.status = 400;
|
|
28
|
+
ctx.body = {
|
|
29
|
+
response: 'no singermid',
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
const { getSingerStarNum } = require('../../module');
|
|
2
|
-
|
|
3
|
-
module.exports = async (ctx, next) => {
|
|
4
|
-
const { singermid } = ctx.query;
|
|
5
|
-
const props = {
|
|
6
|
-
method: 'get',
|
|
7
|
-
params: {
|
|
8
|
-
singermid,
|
|
9
|
-
},
|
|
10
|
-
option: {},
|
|
11
|
-
};
|
|
12
|
-
if (singermid) {
|
|
13
|
-
const { status, body } = await getSingerStarNum(props);
|
|
14
|
-
Object.assign(ctx, {
|
|
15
|
-
status,
|
|
16
|
-
body,
|
|
17
|
-
});
|
|
18
|
-
} else {
|
|
19
|
-
ctx.status = 400;
|
|
20
|
-
ctx.body = {
|
|
21
|
-
response: 'no singermid',
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
};
|
|
1
|
+
const { getSingerStarNum } = require('../../module');
|
|
2
|
+
|
|
3
|
+
module.exports = async (ctx, next) => {
|
|
4
|
+
const { singermid } = ctx.query;
|
|
5
|
+
const props = {
|
|
6
|
+
method: 'get',
|
|
7
|
+
params: {
|
|
8
|
+
singermid,
|
|
9
|
+
},
|
|
10
|
+
option: {},
|
|
11
|
+
};
|
|
12
|
+
if (singermid) {
|
|
13
|
+
const { status, body } = await getSingerStarNum(props);
|
|
14
|
+
Object.assign(ctx, {
|
|
15
|
+
status,
|
|
16
|
+
body,
|
|
17
|
+
});
|
|
18
|
+
} else {
|
|
19
|
+
ctx.status = 400;
|
|
20
|
+
ctx.body = {
|
|
21
|
+
response: 'no singermid',
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
const { getSmartbox } = require('../../module');
|
|
2
|
-
|
|
3
|
-
module.exports = async (ctx, next) => {
|
|
4
|
-
const { key } = ctx.query;
|
|
5
|
-
const props = {
|
|
6
|
-
method: 'get',
|
|
7
|
-
params: {
|
|
8
|
-
key,
|
|
9
|
-
},
|
|
10
|
-
option: {},
|
|
11
|
-
};
|
|
12
|
-
if (key) {
|
|
13
|
-
const { status, body } = await getSmartbox(props);
|
|
14
|
-
Object.assign(ctx, {
|
|
15
|
-
status,
|
|
16
|
-
body,
|
|
17
|
-
});
|
|
18
|
-
} else {
|
|
19
|
-
ctx.status = 200;
|
|
20
|
-
ctx.body = {
|
|
21
|
-
response: null,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
};
|
|
1
|
+
const { getSmartbox } = require('../../module');
|
|
2
|
+
|
|
3
|
+
module.exports = async (ctx, next) => {
|
|
4
|
+
const { key } = ctx.query;
|
|
5
|
+
const props = {
|
|
6
|
+
method: 'get',
|
|
7
|
+
params: {
|
|
8
|
+
key,
|
|
9
|
+
},
|
|
10
|
+
option: {},
|
|
11
|
+
};
|
|
12
|
+
if (key) {
|
|
13
|
+
const { status, body } = await getSmartbox(props);
|
|
14
|
+
Object.assign(ctx, {
|
|
15
|
+
status,
|
|
16
|
+
body,
|
|
17
|
+
});
|
|
18
|
+
} else {
|
|
19
|
+
ctx.status = 200;
|
|
20
|
+
ctx.body = {
|
|
21
|
+
response: null,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
};
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
const { UCommon } = require('../../module');
|
|
2
|
-
const { commonParams } = require('../../module/config');
|
|
3
|
-
|
|
4
|
-
// songmid=001CLC7W2Gpz4J
|
|
5
|
-
module.exports = async (ctx, next) => {
|
|
6
|
-
const song_mid = ctx.query.songmid;
|
|
7
|
-
const song_id = ctx.query.songid || '';
|
|
8
|
-
|
|
9
|
-
const params = Object.assign(commonParams, {
|
|
10
|
-
format: 'json',
|
|
11
|
-
inCharset: 'utf8',
|
|
12
|
-
outCharset: 'utf-8',
|
|
13
|
-
notice: 0,
|
|
14
|
-
platform: 'yqq.json',
|
|
15
|
-
needNewCode: 0,
|
|
16
|
-
data: {
|
|
17
|
-
comm: {
|
|
18
|
-
ct: 24,
|
|
19
|
-
cv: 0,
|
|
20
|
-
},
|
|
21
|
-
songinfo: {
|
|
22
|
-
method: 'get_song_detail_yqq',
|
|
23
|
-
param: {
|
|
24
|
-
song_type: 0,
|
|
25
|
-
song_mid,
|
|
26
|
-
song_id,
|
|
27
|
-
},
|
|
28
|
-
module: 'music.pf_song_detail_svr',
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
const props = {
|
|
33
|
-
method: 'get',
|
|
34
|
-
params,
|
|
35
|
-
option: {},
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
await UCommon(props)
|
|
39
|
-
.then(res => {
|
|
40
|
-
const response = res.data;
|
|
41
|
-
ctx.status = 200;
|
|
42
|
-
ctx.body = {
|
|
43
|
-
response,
|
|
44
|
-
};
|
|
45
|
-
})
|
|
46
|
-
.catch(error => {
|
|
47
|
-
console.log('error', error);
|
|
48
|
-
});
|
|
49
|
-
};
|
|
1
|
+
const { UCommon } = require('../../module');
|
|
2
|
+
const { commonParams } = require('../../module/config');
|
|
3
|
+
|
|
4
|
+
// songmid=001CLC7W2Gpz4J
|
|
5
|
+
module.exports = async (ctx, next) => {
|
|
6
|
+
const song_mid = ctx.query.songmid;
|
|
7
|
+
const song_id = ctx.query.songid || '';
|
|
8
|
+
|
|
9
|
+
const params = Object.assign(commonParams, {
|
|
10
|
+
format: 'json',
|
|
11
|
+
inCharset: 'utf8',
|
|
12
|
+
outCharset: 'utf-8',
|
|
13
|
+
notice: 0,
|
|
14
|
+
platform: 'yqq.json',
|
|
15
|
+
needNewCode: 0,
|
|
16
|
+
data: {
|
|
17
|
+
comm: {
|
|
18
|
+
ct: 24,
|
|
19
|
+
cv: 0,
|
|
20
|
+
},
|
|
21
|
+
songinfo: {
|
|
22
|
+
method: 'get_song_detail_yqq',
|
|
23
|
+
param: {
|
|
24
|
+
song_type: 0,
|
|
25
|
+
song_mid,
|
|
26
|
+
song_id,
|
|
27
|
+
},
|
|
28
|
+
module: 'music.pf_song_detail_svr',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
const props = {
|
|
33
|
+
method: 'get',
|
|
34
|
+
params,
|
|
35
|
+
option: {},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
await UCommon(props)
|
|
39
|
+
.then(res => {
|
|
40
|
+
const response = res.data;
|
|
41
|
+
ctx.status = 200;
|
|
42
|
+
ctx.body = {
|
|
43
|
+
response,
|
|
44
|
+
};
|
|
45
|
+
})
|
|
46
|
+
.catch(error => {
|
|
47
|
+
console.log('error', error);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const { songListCategories } = require('../../module');
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @description: 歌单
|
|
5
|
-
* 1 歌单类型
|
|
6
|
-
* 2 所有歌单
|
|
7
|
-
* 3 分类歌单
|
|
8
|
-
* 4 歌单详情
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
module.exports = async (ctx, next) => {
|
|
12
|
-
const props = {
|
|
13
|
-
method: 'get',
|
|
14
|
-
params: {},
|
|
15
|
-
option: {},
|
|
16
|
-
};
|
|
17
|
-
const { status, body } = await songListCategories(props);
|
|
18
|
-
Object.assign(ctx, {
|
|
19
|
-
status,
|
|
20
|
-
body,
|
|
21
|
-
});
|
|
22
|
-
};
|
|
1
|
+
const { songListCategories } = require('../../module');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description: 歌单
|
|
5
|
+
* 1 歌单类型
|
|
6
|
+
* 2 所有歌单
|
|
7
|
+
* 3 分类歌单
|
|
8
|
+
* 4 歌单详情
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
module.exports = async (ctx, next) => {
|
|
12
|
+
const props = {
|
|
13
|
+
method: 'get',
|
|
14
|
+
params: {},
|
|
15
|
+
option: {},
|
|
16
|
+
};
|
|
17
|
+
const { status, body } = await songListCategories(props);
|
|
18
|
+
Object.assign(ctx, {
|
|
19
|
+
status,
|
|
20
|
+
body,
|
|
21
|
+
});
|
|
22
|
+
};
|