@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,35 +1,35 @@
|
|
|
1
|
-
const y_common = require('../y_common');
|
|
2
|
-
|
|
3
|
-
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
-
const data = Object.assign(params, {
|
|
5
|
-
format: 'json',
|
|
6
|
-
outCharset: 'GB2312',
|
|
7
|
-
cmd: 'shoubo',
|
|
8
|
-
lan: 'all',
|
|
9
|
-
});
|
|
10
|
-
const options = Object.assign(option, {
|
|
11
|
-
params: data,
|
|
12
|
-
});
|
|
13
|
-
return y_common({
|
|
14
|
-
url: '/mv/fcgi-bin/getmv_by_tag',
|
|
15
|
-
method,
|
|
16
|
-
options,
|
|
17
|
-
})
|
|
18
|
-
.then(res => {
|
|
19
|
-
const response = res.data;
|
|
20
|
-
return {
|
|
21
|
-
status: 200,
|
|
22
|
-
body: {
|
|
23
|
-
response,
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
})
|
|
27
|
-
.catch(error => {
|
|
28
|
-
console.log('error', error);
|
|
29
|
-
return {
|
|
30
|
-
body: {
|
|
31
|
-
error,
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
});
|
|
35
|
-
};
|
|
1
|
+
const y_common = require('../y_common');
|
|
2
|
+
|
|
3
|
+
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
+
const data = Object.assign(params, {
|
|
5
|
+
format: 'json',
|
|
6
|
+
outCharset: 'GB2312',
|
|
7
|
+
cmd: 'shoubo',
|
|
8
|
+
lan: 'all',
|
|
9
|
+
});
|
|
10
|
+
const options = Object.assign(option, {
|
|
11
|
+
params: data,
|
|
12
|
+
});
|
|
13
|
+
return y_common({
|
|
14
|
+
url: '/mv/fcgi-bin/getmv_by_tag',
|
|
15
|
+
method,
|
|
16
|
+
options,
|
|
17
|
+
})
|
|
18
|
+
.then(res => {
|
|
19
|
+
const response = res.data;
|
|
20
|
+
return {
|
|
21
|
+
status: 200,
|
|
22
|
+
body: {
|
|
23
|
+
response,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
})
|
|
27
|
+
.catch(error => {
|
|
28
|
+
console.log('error', error);
|
|
29
|
+
return {
|
|
30
|
+
body: {
|
|
31
|
+
error,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
};
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
const y_common = require('../y_common');
|
|
2
|
-
|
|
3
|
-
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
-
const data = Object.assign(params, {
|
|
5
|
-
format: 'json',
|
|
6
|
-
outCharset: 'utf-8',
|
|
7
|
-
channel: 'radio',
|
|
8
|
-
page: 'index',
|
|
9
|
-
tpl: 'wk',
|
|
10
|
-
new: 1,
|
|
11
|
-
p: Math.round(1),
|
|
12
|
-
});
|
|
13
|
-
const options = Object.assign(option, {
|
|
14
|
-
params: data,
|
|
15
|
-
});
|
|
16
|
-
return y_common({
|
|
17
|
-
url: '/v8/fcg-bin/fcg_v8_radiolist.fcg',
|
|
18
|
-
method,
|
|
19
|
-
options,
|
|
20
|
-
})
|
|
21
|
-
.then(res => {
|
|
22
|
-
const response = res.data;
|
|
23
|
-
return {
|
|
24
|
-
status: 200,
|
|
25
|
-
body: {
|
|
26
|
-
response,
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
})
|
|
30
|
-
.catch(error => {
|
|
31
|
-
console.log('error', error);
|
|
32
|
-
return {
|
|
33
|
-
body: {
|
|
34
|
-
error,
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
|
-
};
|
|
1
|
+
const y_common = require('../y_common');
|
|
2
|
+
|
|
3
|
+
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
+
const data = Object.assign(params, {
|
|
5
|
+
format: 'json',
|
|
6
|
+
outCharset: 'utf-8',
|
|
7
|
+
channel: 'radio',
|
|
8
|
+
page: 'index',
|
|
9
|
+
tpl: 'wk',
|
|
10
|
+
new: 1,
|
|
11
|
+
p: Math.round(1),
|
|
12
|
+
});
|
|
13
|
+
const options = Object.assign(option, {
|
|
14
|
+
params: data,
|
|
15
|
+
});
|
|
16
|
+
return y_common({
|
|
17
|
+
url: '/v8/fcg-bin/fcg_v8_radiolist.fcg',
|
|
18
|
+
method,
|
|
19
|
+
options,
|
|
20
|
+
})
|
|
21
|
+
.then(res => {
|
|
22
|
+
const response = res.data;
|
|
23
|
+
return {
|
|
24
|
+
status: 200,
|
|
25
|
+
body: {
|
|
26
|
+
response,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
})
|
|
30
|
+
.catch(error => {
|
|
31
|
+
console.log('error', error);
|
|
32
|
+
return {
|
|
33
|
+
body: {
|
|
34
|
+
error,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
const y_common = require('../y_common');
|
|
2
|
-
|
|
3
|
-
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
-
const hasCommonParams = false;
|
|
5
|
-
const data = Object.assign(params, {
|
|
6
|
-
format: 'json',
|
|
7
|
-
outCharset: 'utf-8',
|
|
8
|
-
platform: 'h5',
|
|
9
|
-
needNewCode: 1,
|
|
10
|
-
});
|
|
11
|
-
const options = Object.assign(option, {
|
|
12
|
-
params: data,
|
|
13
|
-
});
|
|
14
|
-
return y_common({
|
|
15
|
-
url: '/v8/fcg-bin/fcg_myqq_toplist.fcg',
|
|
16
|
-
method,
|
|
17
|
-
options,
|
|
18
|
-
hasCommonParams,
|
|
19
|
-
})
|
|
20
|
-
.then(res => {
|
|
21
|
-
|
|
22
|
-
if (typeof response === 'string') {
|
|
23
|
-
const reg = /^\w+\(({[^()]+})\)$/;
|
|
24
|
-
const matches = response.match(reg);
|
|
25
|
-
if (matches) {
|
|
26
|
-
response = JSON.parse(matches[1]);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
status: 200,
|
|
31
|
-
body: {
|
|
32
|
-
response,
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
})
|
|
36
|
-
.catch(error => {
|
|
37
|
-
console.log('error', error);
|
|
38
|
-
return {
|
|
39
|
-
body: {
|
|
40
|
-
error,
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
};
|
|
1
|
+
const y_common = require('../y_common');
|
|
2
|
+
|
|
3
|
+
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
+
const hasCommonParams = false;
|
|
5
|
+
const data = Object.assign(params, {
|
|
6
|
+
format: 'json',
|
|
7
|
+
outCharset: 'utf-8',
|
|
8
|
+
platform: 'h5',
|
|
9
|
+
needNewCode: 1,
|
|
10
|
+
});
|
|
11
|
+
const options = Object.assign(option, {
|
|
12
|
+
params: data,
|
|
13
|
+
});
|
|
14
|
+
return y_common({
|
|
15
|
+
url: '/v8/fcg-bin/fcg_myqq_toplist.fcg',
|
|
16
|
+
method,
|
|
17
|
+
options,
|
|
18
|
+
hasCommonParams,
|
|
19
|
+
})
|
|
20
|
+
.then(res => {
|
|
21
|
+
let response = res.data;
|
|
22
|
+
if (typeof response === 'string') {
|
|
23
|
+
const reg = /^\w+\(({[^()]+})\)$/;
|
|
24
|
+
const matches = response.match(reg);
|
|
25
|
+
if (matches) {
|
|
26
|
+
response = JSON.parse(matches[1]);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
status: 200,
|
|
31
|
+
body: {
|
|
32
|
+
response,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
})
|
|
36
|
+
.catch(error => {
|
|
37
|
+
console.log('error', error);
|
|
38
|
+
return {
|
|
39
|
+
body: {
|
|
40
|
+
error,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
const y_common = require('../y_common');
|
|
2
|
-
|
|
3
|
-
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
-
const data = Object.assign(params, {
|
|
5
|
-
format: 'json',
|
|
6
|
-
outCharset: 'utf-8',
|
|
7
|
-
hostUin: 0,
|
|
8
|
-
needNewCode: 0,
|
|
9
|
-
});
|
|
10
|
-
const options = Object.assign(option, {
|
|
11
|
-
params: data,
|
|
12
|
-
});
|
|
13
|
-
return y_common({
|
|
14
|
-
url: '/splcloud/fcgi-bin/gethotkey.fcg',
|
|
15
|
-
method,
|
|
16
|
-
options,
|
|
17
|
-
})
|
|
18
|
-
.then(res => {
|
|
19
|
-
const response = res.data;
|
|
20
|
-
return {
|
|
21
|
-
status: 200,
|
|
22
|
-
body: {
|
|
23
|
-
response,
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
})
|
|
27
|
-
.catch(error => {
|
|
28
|
-
console.log('error', error);
|
|
29
|
-
return {
|
|
30
|
-
body: {
|
|
31
|
-
error,
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
});
|
|
35
|
-
};
|
|
1
|
+
const y_common = require('../y_common');
|
|
2
|
+
|
|
3
|
+
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
+
const data = Object.assign(params, {
|
|
5
|
+
format: 'json',
|
|
6
|
+
outCharset: 'utf-8',
|
|
7
|
+
hostUin: 0,
|
|
8
|
+
needNewCode: 0,
|
|
9
|
+
});
|
|
10
|
+
const options = Object.assign(option, {
|
|
11
|
+
params: data,
|
|
12
|
+
});
|
|
13
|
+
return y_common({
|
|
14
|
+
url: '/splcloud/fcgi-bin/gethotkey.fcg',
|
|
15
|
+
method,
|
|
16
|
+
options,
|
|
17
|
+
})
|
|
18
|
+
.then(res => {
|
|
19
|
+
const response = res.data;
|
|
20
|
+
return {
|
|
21
|
+
status: 200,
|
|
22
|
+
body: {
|
|
23
|
+
response,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
})
|
|
27
|
+
.catch(error => {
|
|
28
|
+
console.log('error', error);
|
|
29
|
+
return {
|
|
30
|
+
body: {
|
|
31
|
+
error,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
};
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
const y_common = require('../y_common');
|
|
2
|
-
|
|
3
|
-
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
-
const data = Object.assign(params, {
|
|
5
|
-
format: 'json',
|
|
6
|
-
outCharset: 'utf-8',
|
|
7
|
-
ct: 24,
|
|
8
|
-
qqmusic_ver: 1298,
|
|
9
|
-
// https://github.com/Rain120/qq-music-api/issues/68
|
|
10
|
-
// new_json: 1,
|
|
11
|
-
remoteplace: 'txt.yqq.song',
|
|
12
|
-
// searchid: 58932895599763136,
|
|
13
|
-
t: 0,
|
|
14
|
-
aggr: 1,
|
|
15
|
-
cr: 1,
|
|
16
|
-
lossless: 0,
|
|
17
|
-
flag_qc: 0,
|
|
18
|
-
platform: 'yqq.json',
|
|
19
|
-
});
|
|
20
|
-
const options = Object.assign(option, {
|
|
21
|
-
params: data,
|
|
22
|
-
});
|
|
23
|
-
return y_common({
|
|
24
|
-
url: '/soso/fcgi-bin/client_search_cp',
|
|
25
|
-
method,
|
|
26
|
-
options,
|
|
27
|
-
})
|
|
28
|
-
.then(res => {
|
|
29
|
-
const response = res.data;
|
|
30
|
-
return {
|
|
31
|
-
status: 200,
|
|
32
|
-
body: {
|
|
33
|
-
response,
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
})
|
|
37
|
-
.catch(error => {
|
|
38
|
-
console.log('error', error);
|
|
39
|
-
return {
|
|
40
|
-
body: {
|
|
41
|
-
error,
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
};
|
|
1
|
+
const y_common = require('../y_common');
|
|
2
|
+
|
|
3
|
+
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
+
const data = Object.assign(params, {
|
|
5
|
+
format: 'json',
|
|
6
|
+
outCharset: 'utf-8',
|
|
7
|
+
ct: 24,
|
|
8
|
+
qqmusic_ver: 1298,
|
|
9
|
+
// https://github.com/Rain120/qq-music-api/issues/68
|
|
10
|
+
// new_json: 1,
|
|
11
|
+
remoteplace: 'txt.yqq.song',
|
|
12
|
+
// searchid: 58932895599763136,
|
|
13
|
+
t: 0,
|
|
14
|
+
aggr: 1,
|
|
15
|
+
cr: 1,
|
|
16
|
+
lossless: 0,
|
|
17
|
+
flag_qc: 0,
|
|
18
|
+
platform: 'yqq.json',
|
|
19
|
+
});
|
|
20
|
+
const options = Object.assign(option, {
|
|
21
|
+
params: data,
|
|
22
|
+
});
|
|
23
|
+
return y_common({
|
|
24
|
+
url: '/soso/fcgi-bin/client_search_cp',
|
|
25
|
+
method,
|
|
26
|
+
options,
|
|
27
|
+
})
|
|
28
|
+
.then(res => {
|
|
29
|
+
const response = res.data;
|
|
30
|
+
return {
|
|
31
|
+
status: 200,
|
|
32
|
+
body: {
|
|
33
|
+
response,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
})
|
|
37
|
+
.catch(error => {
|
|
38
|
+
console.log('error', error);
|
|
39
|
+
return {
|
|
40
|
+
body: {
|
|
41
|
+
error,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
const y_common = require('../y_common');
|
|
2
|
-
|
|
3
|
-
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
-
const data = Object.assign(params, {
|
|
5
|
-
format: 'json',
|
|
6
|
-
outCharset: 'utf-8',
|
|
7
|
-
is_xml: 0,
|
|
8
|
-
});
|
|
9
|
-
const options = Object.assign(option, {
|
|
10
|
-
params: data,
|
|
11
|
-
});
|
|
12
|
-
return y_common({
|
|
13
|
-
url: '/splcloud/fcgi-bin/smartbox_new.fcg',
|
|
14
|
-
method,
|
|
15
|
-
options,
|
|
16
|
-
})
|
|
17
|
-
.then(res => {
|
|
18
|
-
const response = res.data;
|
|
19
|
-
return {
|
|
20
|
-
status: 200,
|
|
21
|
-
body: {
|
|
22
|
-
response,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
})
|
|
26
|
-
.catch(error => {
|
|
27
|
-
console.log('error', error);
|
|
28
|
-
return {
|
|
29
|
-
body: {
|
|
30
|
-
error,
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
};
|
|
1
|
+
const y_common = require('../y_common');
|
|
2
|
+
|
|
3
|
+
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
+
const data = Object.assign(params, {
|
|
5
|
+
format: 'json',
|
|
6
|
+
outCharset: 'utf-8',
|
|
7
|
+
is_xml: 0,
|
|
8
|
+
});
|
|
9
|
+
const options = Object.assign(option, {
|
|
10
|
+
params: data,
|
|
11
|
+
});
|
|
12
|
+
return y_common({
|
|
13
|
+
url: '/splcloud/fcgi-bin/smartbox_new.fcg',
|
|
14
|
+
method,
|
|
15
|
+
options,
|
|
16
|
+
})
|
|
17
|
+
.then(res => {
|
|
18
|
+
const response = res.data;
|
|
19
|
+
return {
|
|
20
|
+
status: 200,
|
|
21
|
+
body: {
|
|
22
|
+
response,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
})
|
|
26
|
+
.catch(error => {
|
|
27
|
+
console.log('error', error);
|
|
28
|
+
return {
|
|
29
|
+
body: {
|
|
30
|
+
error,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
const y_common = require('../y_common');
|
|
2
|
-
|
|
3
|
-
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
-
const data = Object.assign(params, {
|
|
5
|
-
format: 'json',
|
|
6
|
-
outCharset: 'utf-8',
|
|
7
|
-
utf8: 1,
|
|
8
|
-
start: 0,
|
|
9
|
-
num: 5,
|
|
10
|
-
});
|
|
11
|
-
const options = Object.assign(option, {
|
|
12
|
-
params: data,
|
|
13
|
-
});
|
|
14
|
-
return y_common({
|
|
15
|
-
url: '/v8/fcg-bin/fcg_v8_simsinger.fcg',
|
|
16
|
-
method,
|
|
17
|
-
options,
|
|
18
|
-
})
|
|
19
|
-
.then(res => {
|
|
20
|
-
const response = res.data;
|
|
21
|
-
return {
|
|
22
|
-
status: 200,
|
|
23
|
-
body: {
|
|
24
|
-
response,
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
})
|
|
28
|
-
.catch(error => {
|
|
29
|
-
console.log('error', error);
|
|
30
|
-
return {
|
|
31
|
-
body: {
|
|
32
|
-
error,
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
});
|
|
36
|
-
};
|
|
1
|
+
const y_common = require('../y_common');
|
|
2
|
+
|
|
3
|
+
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
+
const data = Object.assign(params, {
|
|
5
|
+
format: 'json',
|
|
6
|
+
outCharset: 'utf-8',
|
|
7
|
+
utf8: 1,
|
|
8
|
+
start: 0,
|
|
9
|
+
num: 5,
|
|
10
|
+
});
|
|
11
|
+
const options = Object.assign(option, {
|
|
12
|
+
params: data,
|
|
13
|
+
});
|
|
14
|
+
return y_common({
|
|
15
|
+
url: '/v8/fcg-bin/fcg_v8_simsinger.fcg',
|
|
16
|
+
method,
|
|
17
|
+
options,
|
|
18
|
+
})
|
|
19
|
+
.then(res => {
|
|
20
|
+
const response = res.data;
|
|
21
|
+
return {
|
|
22
|
+
status: 200,
|
|
23
|
+
body: {
|
|
24
|
+
response,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
})
|
|
28
|
+
.catch(error => {
|
|
29
|
+
console.log('error', error);
|
|
30
|
+
return {
|
|
31
|
+
body: {
|
|
32
|
+
error,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
};
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
const
|
|
2
|
-
const y_common = require('../y_common');
|
|
3
|
-
|
|
4
|
-
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
5
|
-
const hasCommonParams = false;
|
|
6
|
-
const data = Object.assign(params, {
|
|
7
|
-
format: 'xml',
|
|
8
|
-
outCharset: 'utf-8',
|
|
9
|
-
utf8: 1,
|
|
10
|
-
r:
|
|
11
|
-
});
|
|
12
|
-
const options = Object.assign(option, {
|
|
13
|
-
params: data,
|
|
14
|
-
});
|
|
15
|
-
return y_common({
|
|
16
|
-
url: '/splcloud/fcgi-bin/fcg_get_singer_desc.fcg',
|
|
17
|
-
method,
|
|
18
|
-
options,
|
|
19
|
-
hasCommonParams,
|
|
20
|
-
})
|
|
21
|
-
.then(res => {
|
|
22
|
-
const response = res.data;
|
|
23
|
-
return {
|
|
24
|
-
status: 200,
|
|
25
|
-
body: {
|
|
26
|
-
response,
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
})
|
|
30
|
-
.catch(error => {
|
|
31
|
-
console.log('error', error);
|
|
32
|
-
return {
|
|
33
|
-
body: {
|
|
34
|
-
error,
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
|
-
};
|
|
1
|
+
const dayjs = require('dayjs');
|
|
2
|
+
const y_common = require('../y_common');
|
|
3
|
+
|
|
4
|
+
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
5
|
+
const hasCommonParams = false;
|
|
6
|
+
const data = Object.assign(params, {
|
|
7
|
+
format: 'xml',
|
|
8
|
+
outCharset: 'utf-8',
|
|
9
|
+
utf8: 1,
|
|
10
|
+
r: dayjs().valueOf(),
|
|
11
|
+
});
|
|
12
|
+
const options = Object.assign(option, {
|
|
13
|
+
params: data,
|
|
14
|
+
});
|
|
15
|
+
return y_common({
|
|
16
|
+
url: '/splcloud/fcgi-bin/fcg_get_singer_desc.fcg',
|
|
17
|
+
method,
|
|
18
|
+
options,
|
|
19
|
+
hasCommonParams,
|
|
20
|
+
})
|
|
21
|
+
.then(res => {
|
|
22
|
+
const response = res.data;
|
|
23
|
+
return {
|
|
24
|
+
status: 200,
|
|
25
|
+
body: {
|
|
26
|
+
response,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
})
|
|
30
|
+
.catch(error => {
|
|
31
|
+
console.log('error', error);
|
|
32
|
+
return {
|
|
33
|
+
body: {
|
|
34
|
+
error,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
const y_common = require('../y_common');
|
|
2
|
-
|
|
3
|
-
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
-
const data = Object.assign(params, {
|
|
5
|
-
format: 'json',
|
|
6
|
-
outCharset: 'utf-8',
|
|
7
|
-
cid: 205360581,
|
|
8
|
-
begin: 0,
|
|
9
|
-
});
|
|
10
|
-
const options = Object.assign(option, {
|
|
11
|
-
params: data,
|
|
12
|
-
});
|
|
13
|
-
return y_common({
|
|
14
|
-
url: '/mv/fcgi-bin/fcg_singer_mv.fcg',
|
|
15
|
-
method,
|
|
16
|
-
options,
|
|
17
|
-
})
|
|
18
|
-
.then(res => {
|
|
19
|
-
const response = res.data;
|
|
20
|
-
return {
|
|
21
|
-
status: 200,
|
|
22
|
-
body: {
|
|
23
|
-
response,
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
})
|
|
27
|
-
.catch(error => {
|
|
28
|
-
console.log('error', error);
|
|
29
|
-
return {
|
|
30
|
-
body: {
|
|
31
|
-
error,
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
});
|
|
35
|
-
};
|
|
1
|
+
const y_common = require('../y_common');
|
|
2
|
+
|
|
3
|
+
module.exports = ({ method = 'get', params = {}, option = {} }) => {
|
|
4
|
+
const data = Object.assign(params, {
|
|
5
|
+
format: 'json',
|
|
6
|
+
outCharset: 'utf-8',
|
|
7
|
+
cid: 205360581,
|
|
8
|
+
begin: 0,
|
|
9
|
+
});
|
|
10
|
+
const options = Object.assign(option, {
|
|
11
|
+
params: data,
|
|
12
|
+
});
|
|
13
|
+
return y_common({
|
|
14
|
+
url: '/mv/fcgi-bin/fcg_singer_mv.fcg',
|
|
15
|
+
method,
|
|
16
|
+
options,
|
|
17
|
+
})
|
|
18
|
+
.then(res => {
|
|
19
|
+
const response = res.data;
|
|
20
|
+
return {
|
|
21
|
+
status: 200,
|
|
22
|
+
body: {
|
|
23
|
+
response,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
})
|
|
27
|
+
.catch(error => {
|
|
28
|
+
console.log('error', error);
|
|
29
|
+
return {
|
|
30
|
+
body: {
|
|
31
|
+
error,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
};
|