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,10 @@
|
||||
import { httpFetch } from '../request.ts'
|
||||
import type { SongInfo } from '../types.ts'
|
||||
|
||||
export default {
|
||||
getPic({ songmid }: SongInfo) {
|
||||
const requestObj = httpFetch(`http://artistpicserver.kuwo.cn/pic.web?corp=kuwo&type=rid_pic&pictype=500&size=500&rid=${songmid}`)
|
||||
requestObj.promise = requestObj.promise.then(({ body }) => /^http/.test(body) ? body : null)
|
||||
return requestObj.promise
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user