refactor(sdk): musicSdk 全量迁移至 TypeScript
This commit is contained in:
1 parent
f289df4cd7
commit
1dfb7a59ca
83 files changed
+924
-732
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import type { HttpRequestObject } from '../../types.ts'
|
||||
|
||||
import { httpFetch } from '../../request.ts'
|
||||
import { zzcSign } from './crypto.ts'
|
||||
|
||||
export const signRequest = async(data) => {
|
||||
// console.log(data)
|
||||
const sign = await zzcSign(JSON.stringify(data))
|
||||
// console.log('sign', sign)
|
||||
return httpFetch(`https://u.y.qq.com/cgi-bin/musics.fcg?sign=${sign}`, {
|
||||
method: 'post',
|
||||
headers: {
|
||||
'User-Agent': 'QQMusic 14090508(android 12)',
|
||||
},
|
||||
body: data,
|
||||
}).promise
|
||||
}
|
||||
Reference in new issue
Block a user