Starink 6 роки тому
батько
коміт
f1025cf0bf
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      server/controller/user.js

+ 1 - 1
server/controller/user.js

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