Skip to content

Commit 59ba6a7

Browse files
committed
fix(微信登录): 在编辑器模式下添加缺失的UserId和Token字段
在Unity编辑器模式下模拟微信登录时,补充了WeChatLoginSuccess对象中缺失的UserId和Token字段,以保持与真实环境的一致性
1 parent 3a45943 commit 59ba6a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Runtime/WeChatLoginManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public void Login(Action<WeChatLoginSuccess> loginSuccess, Action<int> loginFail
149149
_loginSuccess = loginSuccess;
150150
_loginFail = loginFail;
151151
#if UNITY_EDITOR
152-
_loginSuccess?.Invoke(new WeChatLoginSuccess() { NickName = "test", OpenId = SystemInfo.deviceUniqueIdentifier, PhotoUrl = "test", UnionId = SystemInfo.deviceUniqueIdentifier });
152+
_loginSuccess?.Invoke(new WeChatLoginSuccess() { NickName = "test", OpenId = SystemInfo.deviceUniqueIdentifier, UserId = SystemInfo.deviceUniqueIdentifier, Token = "test", PhotoUrl = "test", UnionId = SystemInfo.deviceUniqueIdentifier });
153153
return;
154154
#endif
155155
if (_shareSDK.IsAuthorized(PlatformType.WeChat))

0 commit comments

Comments
 (0)