|
|
@@ -69,7 +69,7 @@ class UserController {
|
|
|
ctx.body = Response.failed('验证码错误');
|
|
|
}else if(!myReg.test(data.email)){
|
|
|
ctx.body = Response.failed('邮箱格式有误');
|
|
|
- }else if(data.name.length<1 || data.name.length>10 || data.password.length<6 || data.password.length>20 || data.phone!==11){
|
|
|
+ }else if(data.name.length<1 || data.name.length>10 || data.password.length<6 || data.password.length>20 || data.phone.length !== 11){
|
|
|
ctx.body = Response.failed('参数非法');
|
|
|
}else{
|
|
|
const hashPassword = bcrypt.hashSync(data.password, 10);
|