添加手机号注册,检验验证码,校验用户名接口

This commit is contained in:
KongValley 2019-04-09 15:41:02 +08:00
parent 4555c12959
commit 2dce97d800
3 changed files with 46 additions and 0 deletions

17
module/captch_register.js Normal file
View 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
View 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
View 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 }
)
}