com.xd.sdk.account 6.22.2 → 6.22.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Mobile/Bridge/AccountMobile.cs +6 -4
- package/Mobile/Plugins/Android/com/xd/account/bridge/XDGAccountBridge.java +21 -0
- package/Mobile/Plugins/iOS/XDAccountBridge.m +15 -2
- package/Mobile/XDGAccountMobile.cs +2 -2
- package/Plugins/Android/libs/XDGAccount_6.22.4.aar +0 -0
- package/Plugins/iOS/XDAccountSDK.framework/Headers/XDAccountSDK.h +1 -0
- package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccount.h +3 -1
- package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccountVersion.h +2 -2
- package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGRoleInfo.h +22 -0
- package/Plugins/iOS/XDAccountSDK.framework/Info.plist +0 -0
- package/Plugins/iOS/XDAccountSDK.framework/XDAccountSDK +0 -0
- package/Runtime/IXDGAccount.cs +1 -1
- package/Runtime/XDGAccount.cs +2 -2
- package/Runtime/XDGRoleInfo.cs +24 -0
- package/Runtime/XDGRoleInfo.cs.meta +3 -0
- package/package.json +1 -1
- package/Plugins/Android/libs/XDGAccount_6.22.2.aar +0 -0
- /package/Plugins/Android/libs/{XDGAccount_6.22.2.aar.meta → XDGAccount_6.22.4.aar.meta} +0 -0
|
@@ -21,18 +21,20 @@ namespace XD.SDK.Account.Mobile.Bridge
|
|
|
21
21
|
}
|
|
22
22
|
#endif
|
|
23
23
|
|
|
24
|
-
public static void OpenUserDashboard()
|
|
24
|
+
public static void OpenUserDashboard(XDGRoleInfo roleInfo)
|
|
25
25
|
{
|
|
26
26
|
#if UNITY_ANDROID
|
|
27
|
-
|
|
27
|
+
using (AndroidJavaClass accountBridge = new AndroidJavaClass("com.xd.account.bridge.XDGAccountBridge")) {
|
|
28
|
+
accountBridge.CallStatic("openUserDashboard", roleInfo.roleId, roleInfo.roleName, roleInfo.serverId, roleInfo.extra);
|
|
29
|
+
}
|
|
28
30
|
#else
|
|
29
|
-
XDAccountOpenUserDashboard();
|
|
31
|
+
XDAccountOpenUserDashboard(roleInfo.roleId, roleInfo.roleName, roleInfo.serverId, roleInfo.extra);
|
|
30
32
|
#endif
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
#if UNITY_IOS
|
|
34
36
|
[DllImport("__Internal")]
|
|
35
|
-
private static extern void XDAccountOpenUserDashboard();
|
|
37
|
+
private static extern void XDAccountOpenUserDashboard(string roleId, string roleName, string serverId, string extra);
|
|
36
38
|
#endif
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
package com.xd.account.bridge;
|
|
2
2
|
|
|
3
|
+
import android.os.Handler;
|
|
4
|
+
import android.os.Looper;
|
|
5
|
+
|
|
3
6
|
import com.xd.intl.common.net.CommonParameterManager;
|
|
4
7
|
import com.xd.intl.common.bridge.BridgeUtil;
|
|
5
8
|
import com.xd.intl.common.global.GlobalUserStore;
|
|
9
|
+
import com.xd.intl.account.XDGAccount;
|
|
10
|
+
import com.xd.intl.account.v2.entity.RoleInfo;
|
|
6
11
|
|
|
7
12
|
public class XDGAccountBridge {
|
|
8
13
|
public static String getAuthorization(String url, String method, long timestamp) {
|
|
@@ -12,4 +17,20 @@ public class XDGAccountBridge {
|
|
|
12
17
|
public static String getCurrentUser() {
|
|
13
18
|
return BridgeUtil.convertUserJsonString4Bridge(GlobalUserStore.INSTANCE.getCurrentXDUser());
|
|
14
19
|
}
|
|
20
|
+
|
|
21
|
+
public static void openUserDashboard (String roleId, String roleName, String serverId, String extra){
|
|
22
|
+
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
|
23
|
+
@Override
|
|
24
|
+
public void run() {
|
|
25
|
+
XDGAccount.openUserDashboard(
|
|
26
|
+
RoleInfo.newBuilder()
|
|
27
|
+
.setRoleId(roleId)
|
|
28
|
+
.setRoleName(roleName)
|
|
29
|
+
.setServerId(serverId)
|
|
30
|
+
.setExtra(extra)
|
|
31
|
+
.build()
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
15
36
|
}
|
|
@@ -26,6 +26,19 @@ const char*XDAccountBridgeGetUser() {
|
|
|
26
26
|
return [userDic.tdsglobal_jsonString UTF8String];
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
void XDAccountOpenUserDashboard() {
|
|
30
|
-
[
|
|
29
|
+
void XDAccountOpenUserDashboard(const char* roleId, const char* roleName, const char* serverId, const char* extra) {
|
|
30
|
+
XDGRoleInfo *roleInfo = [XDGRoleInfo new];
|
|
31
|
+
if (roleId){
|
|
32
|
+
roleInfo.roleId = [NSString stringWithUTF8String:roleId];
|
|
33
|
+
}
|
|
34
|
+
if (roleName){
|
|
35
|
+
roleInfo.roleName = [NSString stringWithUTF8String:roleName];
|
|
36
|
+
}
|
|
37
|
+
if (serverId){
|
|
38
|
+
roleInfo.serverId = [NSString stringWithUTF8String:serverId];
|
|
39
|
+
}
|
|
40
|
+
if (extra){
|
|
41
|
+
roleInfo.extra = [NSString stringWithUTF8String:extra];
|
|
42
|
+
}
|
|
43
|
+
[XDGAccount openUserDashboardWithInfo:roleInfo];
|
|
31
44
|
}
|
|
@@ -128,9 +128,9 @@ namespace XD.SDK.Account{
|
|
|
128
128
|
XDGAccountMobileImpl.GetInstance().BindByType(loginType, (b, error)=> callback(b, error as XDGError));
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
public void OpenUserDashboard()
|
|
131
|
+
public void OpenUserDashboard(XDGRoleInfo roleInfo)
|
|
132
132
|
{
|
|
133
|
-
AccountMobile.OpenUserDashboard();
|
|
133
|
+
AccountMobile.OpenUserDashboard(roleInfo);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
#endregion
|
|
Binary file
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
#import <Foundation/Foundation.h>
|
|
3
3
|
#import <XDCommonSDK/XDCommonSDK.h>
|
|
4
4
|
#import <XDAccountSDK/XDGLoginEntriesConfig.h>
|
|
5
|
+
#import <XDAccountSDK/XDGRoleInfo.h>
|
|
5
6
|
|
|
6
7
|
NS_ASSUME_NONNULL_BEGIN
|
|
7
8
|
|
|
@@ -59,7 +60,8 @@ typedef void (^XDGUserStatusChangeCallback)(XDGUserStateChangeCode userStateChan
|
|
|
59
60
|
+ (void)openUserCenter;
|
|
60
61
|
|
|
61
62
|
/// 打开个人信息页
|
|
62
|
-
|
|
63
|
+
/// @param roleInfo 角色信息
|
|
64
|
+
+ (void)openUserDashboardWithInfo:(XDGRoleInfo *_Nullable)roleInfo;
|
|
63
65
|
|
|
64
66
|
/// 打开注销页面
|
|
65
67
|
+ (void)accountCancellation;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// XDGRoleInfo.h
|
|
3
|
+
// XDAccountSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Fattycat on 2024/9/29.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
11
|
+
|
|
12
|
+
@interface XDGRoleInfo : NSObject
|
|
13
|
+
|
|
14
|
+
@property (nonatomic, nullable, copy) NSString *roleId;
|
|
15
|
+
@property (nonatomic, nullable, copy) NSString *roleName;
|
|
16
|
+
@property (nonatomic, nullable, copy) NSString *serverId;
|
|
17
|
+
@property (nonatomic, nullable, copy) NSString *extra;
|
|
18
|
+
|
|
19
|
+
- (NSDictionary *)toDictionary;
|
|
20
|
+
@end
|
|
21
|
+
|
|
22
|
+
NS_ASSUME_NONNULL_END
|
|
Binary file
|
|
Binary file
|
package/Runtime/IXDGAccount.cs
CHANGED
package/Runtime/XDGAccount.cs
CHANGED
|
@@ -89,9 +89,9 @@ namespace XD.SDK.Account{
|
|
|
89
89
|
platformWrapper.BindByType(loginType, callback);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
public static void OpenUserDashboard()
|
|
92
|
+
public static void OpenUserDashboard(XDGRoleInfo roleInfo)
|
|
93
93
|
{
|
|
94
|
-
platformWrapper.OpenUserDashboard();
|
|
94
|
+
platformWrapper.OpenUserDashboard(roleInfo);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
public static string GetLoginTypeString(LoginType loginType)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
namespace XD.SDK.Account
|
|
2
|
+
{
|
|
3
|
+
public class XDGRoleInfo
|
|
4
|
+
{
|
|
5
|
+
/// <summary>
|
|
6
|
+
/// Game Role ID. required
|
|
7
|
+
/// </summary>
|
|
8
|
+
public string roleId;
|
|
9
|
+
/// <summary>
|
|
10
|
+
/// Game Role Name. required
|
|
11
|
+
/// </summary>
|
|
12
|
+
public string roleName;
|
|
13
|
+
|
|
14
|
+
/// <summary>
|
|
15
|
+
/// Game Server ID. required
|
|
16
|
+
/// </summary>
|
|
17
|
+
public string serverId;
|
|
18
|
+
|
|
19
|
+
/// <summary>
|
|
20
|
+
/// Extra information. optional
|
|
21
|
+
/// </summary>
|
|
22
|
+
public string extra;
|
|
23
|
+
}
|
|
24
|
+
}
|
package/package.json
CHANGED
|
Binary file
|
|
File without changes
|