liuyu пре 4 година
родитељ
комит
1b69e6fedd
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      app/service/user.js

+ 4 - 4
app/service/user.js

@@ -20,10 +20,10 @@ class UserService extends CrudService {
     console.log(data);
     assert(name && phone && passwd, '缺少部分信息项');
     assert(/^\d{11}$/i.test(phone), 'phone无效');
-    const user = await this.model.findOne({ phone });
-    if (user) {
-      throw new BusinessError(ErrorCode.DATA_EXISTED);
-    }
+    // const user = await this.model.findOne({ phone });
+    // if (user) {
+    //   throw new BusinessError(ErrorCode.DATA_EXISTED);
+    // }
     const newdata = data;
     const pas = await this.createJwtPwd(passwd);
     newdata.passwd = { secret: pas };