lrf 2 лет назад
Родитель
Сommit
af72e4a2d3
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      app/service/user/user.js

+ 1 - 1
app/service/user/user.js

@@ -34,7 +34,7 @@ class UserService extends CrudService {
   async wxAppLogin({ openid }) {
     const user = await this.model.findOne({ openid });
     // 没注册的需要手动注册
-    if (!user) return user;
+    if (user) return user;
     const { type, _id } = user;
     // 超级管理员,普通用户,游客不需要其他信息,user里的就是
     if ([ '-1', '0', '10' ].includes(type)) return user;