fix: 增加修改手机的验证码发送
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ const TicketSchema = new mongoose.Schema({
|
|||||||
amount: {
|
amount: {
|
||||||
type: Number
|
type: Number
|
||||||
},
|
},
|
||||||
|
targetAddress: {
|
||||||
|
type: String
|
||||||
|
},
|
||||||
status: {
|
status: {
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|||||||
Reference in New Issue
Block a user