update: 使用 crypto-js 重构 crypto 部分

This commit is contained in:
binaryify
2024-04-25 15:19:28 +08:00
parent d55fb43f0a
commit 2bb5269dfa
7 changed files with 16 additions and 19 deletions
+2 -3
View File
@@ -1,11 +1,10 @@
const CryptoJS = require('crypto-js')
module.exports = (query, request) => {
const data = {
phone: query.phone,
countrycode: query.countrycode || '86',
captcha: query.captcha,
password: query.password
? crypto.createHash('md5').update(query.password).digest('hex')
: '',
password: query.password ? CryptoJS.MD5(query.password).toString() : '',
}
return request(
'POST',