refactor: api是否加密由配置文件决定;封装option

This commit is contained in:
overwriter
2024-06-25 00:12:53 +08:00
parent 8d6fa6b6ca
commit d23b4a3653
328 changed files with 483 additions and 678 deletions
+2 -13
View File
@@ -1,5 +1,6 @@
// 本地歌曲匹配音乐信息
const createOption = require('../util/option.js')
module.exports = (query, request) => {
let songs = [
{
@@ -13,17 +14,5 @@ module.exports = (query, request) => {
const data = {
songs: JSON.stringify(songs),
}
return request(
'POST',
`https://interface3.music.163.com/eapi/search/match/new`,
data,
{
crypto: 'eapi',
cookie: query.cookie,
ua: query.ua || '',
proxy: query.proxy,
url: '/api/search/match/new',
realIP: query.realIP,
},
)
return request('POST', `/api/search/match/new`, data, createOption(query))
}