mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 22:51:23 +08:00
登录接口更新
This commit is contained in:
@@ -416,6 +416,8 @@ $ sudo docker run -d -p 3000:3000 netease-music-api
|
||||
存结果的接口 , 可在请求 url 后面加一个时间戳参数使 url 不同 , 例子 :
|
||||
`/simi/playlist?id=347230×tamp=1503019930000` (之所以加入缓存机制是因为项目早期没有缓存机制,很多 issues 都是报 IP 高频,请按自己需求改造缓存中间件(app.js),源码不复杂)
|
||||
|
||||
!> 不要频繁调登录接口,不然可能会被风控,登录状态还存在就不要重复调登录接口
|
||||
|
||||
!> 如果是跨域请求 , 请在所有请求带上 `xhrFields: { withCredentials: true }` (axios 为 `withCredentials: true`, Fetch API 为 `fetch(url, { credentials: 'include' })`), 或直接手动传入 cookie (参见 `登录`), 否则
|
||||
可能会因为没带上 cookie 导致 301, 具体例子可看 `public/test.html`, 访问`http://localhost:3000/test.html`(默认端口的话) 例子使用 jQuery 和 axios
|
||||
|
||||
@@ -439,6 +441,8 @@ $ sudo docker run -d -p 3000:3000 netease-music-api
|
||||
|
||||
说明 : 登录有三个接口,建议使用`encodeURIComponent`对密码编码或者使用`POST`请求,避免某些特殊字符无法解析,如`#`(`#`在 url 中会被识别为 hash,而不是 query)
|
||||
|
||||
不要频繁调登录接口,不然可能会被风控,登录状态还存在就不要重复调登录接口
|
||||
|
||||
#### 1. 手机登录
|
||||
|
||||
**必选参数 :**
|
||||
|
||||
Reference in New Issue
Block a user