mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
添加手机号注册,检验验证码,校验用户名接口
This commit is contained in:
parent
4555c12959
commit
2dce97d800
17
module/captch_register.js
Normal file
17
module/captch_register.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// 注册账号
|
||||||
|
const crypto = require('crypto')
|
||||||
|
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {
|
||||||
|
captcha: query.captcha,
|
||||||
|
phone: query.phone,
|
||||||
|
password: crypto.createHash('md5').update(query.password).digest('hex'),
|
||||||
|
nickname: query.nickname
|
||||||
|
}
|
||||||
|
return request(
|
||||||
|
'POST',
|
||||||
|
`https://music.163.com/weapi/register/cellphone`,
|
||||||
|
data,
|
||||||
|
{ crypto: 'weapi', cookie: query.cookie, proxy: query.proxy }
|
||||||
|
)
|
||||||
|
}
|
14
module/captch_sent.js
Normal file
14
module/captch_sent.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
// 发送验证码
|
||||||
|
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {
|
||||||
|
ctcode: '86',
|
||||||
|
cellphone: query.cellphone,
|
||||||
|
}
|
||||||
|
return request(
|
||||||
|
'POST',
|
||||||
|
`https://music.163.com/weapi/sms/captcha/sent`,
|
||||||
|
data,
|
||||||
|
{ crypto: 'weapi', cookie: query.cookie, proxy: query.proxy }
|
||||||
|
)
|
||||||
|
}
|
15
module/captch_verify.js
Normal file
15
module/captch_verify.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
// 发送验证码
|
||||||
|
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {
|
||||||
|
ctcode: '86',
|
||||||
|
cellphone: query.cellphone,
|
||||||
|
captcha: query.captcha
|
||||||
|
}
|
||||||
|
return request(
|
||||||
|
'POST',
|
||||||
|
`https://music.163.com/weapi/sms/captcha/verify`,
|
||||||
|
data,
|
||||||
|
{ crypto: 'weapi', cookie: query.cookie, proxy: query.proxy }
|
||||||
|
)
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user