liuyu %!s(int64=5) %!d(string=hai) anos
pai
achega
0f738b922e
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      app/service/user.js

+ 4 - 4
app/service/user.js

@@ -66,10 +66,10 @@ class UserService extends CrudService {
 
   async update({ id }, data) {
     const user = await this.model.findById(id);
-    const { phone, role } = data;
-    const phoneList = await this.model.find({ phone, role });
-    const is_has = phoneList.find(f => f.id !== id);
-    if (is_has) throw new BusinessError('此身份手机号已被注册,请更换手机号');
+    // const { phone, role } = data;
+    // const phoneList = await this.model.find({ phone, role });
+    // const is_has = phoneList.find(f => f.id !== id);
+    // if (is_has) throw new BusinessError('此身份手机号已被注册,请更换手机号');
     if (data.name) {
       user.name = data.name;
     }