fix: 增加修改手机的验证码发送

This commit is contained in:
chaosBreaking
2019-09-08 00:28:41 +08:00
parent b5745e3f7f
commit 44b30decdf
3 changed files with 6 additions and 2 deletions

View File

@@ -7,7 +7,8 @@ const CODE_TYPE = {
msgSignIn: -1, msgSignIn: -1,
signUp: 1, signUp: 1,
forgetPasswd: 2, forgetPasswd: 2,
changePasswd: 3 changePasswd: 3,
changePhone: 4
}; };
/** /**
* code type: * code type:

View File

@@ -14,6 +14,9 @@ const TicketSchema = new mongoose.Schema({
amount: { amount: {
type: Number type: Number
}, },
targetAddress: {
type: String
},
status: { status: {
type: String type: String
}, },

View File

@@ -28,7 +28,7 @@ module.exports = {
code: 1, code: 1,
error: 'Missing required param' error: 'Missing required param'
}); });
const isValidCode = MsgCode.verifyCode({ id: userId, code, type: 2 }); const isValidCode = MsgCode.verifyCode({ id: userId, code, type: 4 });
if (!isValidCode) return res.json({ if (!isValidCode) return res.json({
code: 2, code: 2,
error: 'Incorrect Code' error: 'Incorrect Code'