修复第一次登录,user_info 表 loginType 保存的值不对的问题

This commit is contained in:
Mikasa33 2024-07-11 19:51:24 +08:00 committed by GitHub
parent 82e161ef38
commit 1b2de0ba70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -185,11 +185,10 @@ export class UserLoginService extends BaseService {
if (wxInfo) { if (wxInfo) {
wxUserInfo.id = wxInfo.id; wxUserInfo.id = wxInfo.id;
} }
await this.userWxEntity.save({ return this.userWxEntity.save({
...wxUserInfo, ...wxUserInfo,
type, type,
}); });
return wxUserInfo;
} }
/** /**
@ -230,6 +229,7 @@ export class UserLoginService extends BaseService {
nickName: wxUserInfo.nickName, nickName: wxUserInfo.nickName,
avatarUrl, avatarUrl,
gender: wxUserInfo.gender, gender: wxUserInfo.gender,
loginType: wxUserInfo.type,
}; };
await this.userInfoEntity.insert(userInfo); await this.userInfoEntity.insert(userInfo);
} }