|
@@ -67,7 +67,7 @@ class UserService extends CrudService {
|
|
}
|
|
}
|
|
if (phone) {
|
|
if (phone) {
|
|
const _user = await this.model.find({ phone });
|
|
const _user = await this.model.find({ phone });
|
|
- if (_user.length === 0 || (_user.lenght === 1 && _user[0].id === user.id)) {
|
|
|
|
|
|
+ if (_.isEqual(_user.length, 0) || (_.isEqual(_user.length, 1) && _.isEqual(_user[0].id, user.id))) {
|
|
if (user.type === '0' || user.type === '1') {
|
|
if (user.type === '0' || user.type === '1') {
|
|
const staff = await this.smodel.findById(user.userid);
|
|
const staff = await this.smodel.findById(user.userid);
|
|
staff.phone = phone;
|
|
staff.phone = phone;
|