提交 6a407a2d 编写于 作者: zhuangtongfa's avatar zhuangtongfa 提交者: GitHub

Merge pull request #460 from KongValley/master

添加手机注册相关接口
// 注册账号
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 }
)
}
\ No newline at end of file
// 发送验证码
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 }
)
}
// 校验验证码
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 }
)
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册