lrf %!s(int64=2) %!d(string=hai) anos
pai
achega
681cb8935e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;