mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-23 08:01:23 +08:00
update: cookie 处理优化
This commit is contained in:
@@ -14,6 +14,14 @@ module.exports = {
|
||||
})
|
||||
return obj
|
||||
},
|
||||
cookieObjToString(cookie) {
|
||||
return Object.keys(cookie)
|
||||
.map(
|
||||
(key) =>
|
||||
`${encodeURIComponent(key)}=${encodeURIComponent(cookie[key])}`,
|
||||
)
|
||||
.join('; ')
|
||||
},
|
||||
getRandom(num) {
|
||||
var random = Math.floor(
|
||||
(Math.random() + Math.floor(Math.random() * 9 + 1)) *
|
||||
|
||||
Reference in New Issue
Block a user