fix: 解析邀请码进制丢失

This commit is contained in:
chaosBreaking
2019-09-08 00:48:03 +08:00
parent a2d6401cde
commit 58a58ad675

View File

@@ -79,7 +79,7 @@ module.exports = {
validInviter = { id: 'AlUx9h!w0)y9' }; validInviter = { id: 'AlUx9h!w0)y9' };
} }
else { else {
const invitePhone = '+86-' + parseInt(inviter); const invitePhone = '+86-' + parseInt(inviter, 36);
validInviter = await User.findOne({ phone: invitePhone }).catch(null); validInviter = await User.findOne({ phone: invitePhone }).catch(null);
if (!validInviter) return res.json({ if (!validInviter) return res.json({
code: 4, code: 4,