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