Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_47285076
NeteaseCloudMusicApi_nicole-n
提交
077a347d
N
NeteaseCloudMusicApi_nicole-n
项目概览
weixin_47285076
/
NeteaseCloudMusicApi_nicole-n
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
NeteaseCloudMusicApi_nicole-n
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
077a347d
编写于
8月 20, 2021
作者:
B
binaryify
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
手机登录增加验证码登录方式 #1328, #1075 #1227
上级
ced76896
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
21 addition
and
6 deletion
+21
-6
CHANGELOG.MD
CHANGELOG.MD
+3
-0
docs/README.md
docs/README.md
+4
-2
interface.d.ts
interface.d.ts
+8
-0
module/login_cellphone.js
module/login_cellphone.js
+5
-3
package.json
package.json
+1
-1
未找到文件。
CHANGELOG.MD
浏览文件 @
077a347d
# 更新日志
### 4.0.20 | 2021.8.20
-
手机登录增加验证码登录方式
[
#1328
](
https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1328
)
### 4.0.19 | 2021.8.10
-
修复若干问题
...
...
docs/README.md
浏览文件 @
077a347d
...
...
@@ -426,11 +426,13 @@ $ sudo docker run -d -p 3000:3000 netease-music-api
**可选参数 :**
`countrycode`
: 国家码,用于国外手机号登录,例如美国传入:
`1`
`md5_password`
: md5加密后的密码,传入后
`password`
将失效
`md5_password`
: md5加密后的密码,传入后
`password`
参数将失效
`captcha`
: 验证码,使用
[
`/captcha/sent`
](
#发送验证码
)
接口传入手机号获取验证码,调用此接口传入验证码,可使用验证码登录,传入后
`password`
参数将失效
**接口地址 :**
`/login/cellphone`
**调用例子 :**
`/login/cellphone?phone=xxx&password=yyy`
`/login/cellphone?phone=xxx&md5_password=yyy`
**调用例子 :**
`/login/cellphone?phone=xxx&password=yyy`
`/login/cellphone?phone=xxx&md5_password=yyy`
`/login/cellphone?phone=xxx&captcha=1234`
#### 2. 邮箱登录
...
...
interface.d.ts
浏览文件 @
077a347d
...
...
@@ -694,6 +694,14 @@ export function login_cellphone(
}
&
RequestBaseConfig
,
):
Promise
<
Response
>
export
function
login_cellphone
(
params
:
{
phone
:
number
|
string
countrycode
?:
number
|
string
captcha
:
number
|
string
}
&
RequestBaseConfig
,
):
Promise
<
Response
>
export
function
login_refresh
(
params
:
RequestBaseConfig
):
Promise
<
Response
>
export
function
login_status
(
params
:
RequestBaseConfig
):
Promise
<
Response
>
...
...
module/login_cellphone.js
浏览文件 @
077a347d
...
...
@@ -7,9 +7,11 @@ module.exports = async (query, request) => {
const
data
=
{
phone
:
query
.
phone
,
countrycode
:
query
.
countrycode
||
'
86
'
,
password
:
query
.
md5_password
||
crypto
.
createHash
(
'
md5
'
).
update
(
query
.
password
).
digest
(
'
hex
'
),
captcha
:
query
.
captcha
,
[
query
.
captcha
?
'
captcha
'
:
'
password
'
]:
query
.
captcha
?
query
.
captcha
:
query
.
md5_password
||
crypto
.
createHash
(
'
md5
'
).
update
(
query
.
password
).
digest
(
'
hex
'
),
rememberLogin
:
'
true
'
,
}
let
result
=
await
request
(
...
...
package.json
浏览文件 @
077a347d
{
"name"
:
"NeteaseCloudMusicApi"
,
"version"
:
"4.0.
19
"
,
"version"
:
"4.0.
20
"
,
"description"
:
"网易云音乐 NodeJS 版 API"
,
"scripts"
:
{
"start"
:
"node app.js"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录