This repository has been archived by the owner on Apr 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #460 from KongValley/master
添加手机注册相关接口
- Loading branch information
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 } | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 } | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 } | ||
) | ||
} |