com.xd.sdk.account 6.32.0 → 6.33.0
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/XDGAccountMobile.cs +5 -0
- package/Mobile/XDGAccountMobileImpl.cs +33 -0
- package/Plugins/Android/libs/XDGAccount_6.33.0.aar +0 -0
- package/Plugins/Android/libs/XDGSupport_6.33.0.aar +0 -0
- package/Plugins/Android/libs/XDGSupport_6.33.0.aar.meta +32 -0
- package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccount.h +10 -0
- package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccountVersion.h +3 -3
- package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGLoginService.h +4 -0
- package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGRoleInfo.h +3 -0
- package/Plugins/iOS/XDAccountSDK.framework/Info.plist +0 -0
- package/Plugins/iOS/XDAccountSDK.framework/XDAccountSDK +0 -0
- package/Runtime/IXDGAccount.cs +2 -0
- package/Runtime/XDGAccount.cs +11 -0
- package/Runtime/XDGRoleInfo.cs +6 -1
- package/Runtime/XDGUserStatusCode.cs +4 -0
- package/package.json +1 -1
- package/Plugins/Android/libs/XDGAccount_6.32.0.aar +0 -0
- /package/Plugins/Android/libs/{XDGAccount_6.32.0.aar.meta → XDGAccount_6.33.0.aar.meta} +0 -0
|
@@ -132,6 +132,11 @@ namespace XD.SDK.Account{
|
|
|
132
132
|
XDGAccountMobileImpl.GetInstance().OpenUserDashboard(roleInfo);
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
+
public void OpenCustomerService(XDGRoleInfo roleInfo, string path, Dictionary<string, object> paramsMap)
|
|
136
|
+
{
|
|
137
|
+
XDGAccountMobileImpl.GetInstance().OpenCustomerService(roleInfo, path, paramsMap);
|
|
138
|
+
}
|
|
139
|
+
|
|
135
140
|
#endregion
|
|
136
141
|
}
|
|
137
142
|
}
|
|
@@ -229,6 +229,10 @@ namespace XD.SDK.Account{
|
|
|
229
229
|
callback(XDGUserStatusCodeType.UNBIND, wrapper.message);
|
|
230
230
|
}else if (wrapper.code == (int) XDGUserStatusCodeType.ProtocolAgreedAfterLogout){
|
|
231
231
|
callback(XDGUserStatusCodeType.ProtocolAgreedAfterLogout, wrapper.message);
|
|
232
|
+
} else if (wrapper.code == (int) XDGUserStatusCodeType.SupportNoUnRead){
|
|
233
|
+
callback(XDGUserStatusCodeType.SupportNoUnRead, wrapper.message);
|
|
234
|
+
} else if (wrapper.code == (int) XDGUserStatusCodeType.SupportHasUnRead){
|
|
235
|
+
callback(XDGUserStatusCodeType.SupportHasUnRead, wrapper.message);
|
|
232
236
|
} else{
|
|
233
237
|
XDGLogger.Warn($"AddUserStatusChangeCallback 未知回调 :{result.ToJSON()}");
|
|
234
238
|
callback(XDGUserStatusCodeType.ERROR, wrapper.message);
|
|
@@ -440,5 +444,34 @@ namespace XD.SDK.Account{
|
|
|
440
444
|
.CommandBuilder();
|
|
441
445
|
EngineBridge.GetInstance().CallHandler(command);
|
|
442
446
|
}
|
|
447
|
+
|
|
448
|
+
public void OpenCustomerService(XDGRoleInfo roleInfo, string path, Dictionary<string, object> paramsMap){
|
|
449
|
+
var roleDic = new Dictionary<string, object>{
|
|
450
|
+
{"serverId", roleInfo?.serverId},
|
|
451
|
+
{"roleId", roleInfo?.roleId},
|
|
452
|
+
{"roleName", roleInfo?.roleName},
|
|
453
|
+
{"roleLevel", roleInfo?.roleLevel ?? 0},
|
|
454
|
+
{"extra", roleInfo?.extra}
|
|
455
|
+
};
|
|
456
|
+
// Android 桥接要求 params 为 String paramsJsonStr,iOS 兼容 NSString / NSDictionary
|
|
457
|
+
var paramsJson = paramsMap != null ? Json.Serialize(paramsMap) : null;
|
|
458
|
+
|
|
459
|
+
// 一次性整体传 Args(Dictionary),让 roleDic 作为嵌套 dict 保留为 JSON Object(Android @BridgeParam JSONObject 要求)
|
|
460
|
+
// 不能用 .Args("openCustomerService", roleDic),会触发 Command.Builder 第 98 行的 Dictionary→String 自动序列化
|
|
461
|
+
var allArgs = new Dictionary<string, object>{
|
|
462
|
+
{"openCustomerService", roleDic},
|
|
463
|
+
{"path", path},
|
|
464
|
+
{"params", paramsJson}
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
var command = new Command.Builder()
|
|
468
|
+
.Service(XDG_ACCOUNT_SERVICE)
|
|
469
|
+
.Method("openCustomerService")
|
|
470
|
+
.Args(allArgs)
|
|
471
|
+
.Callback(false)
|
|
472
|
+
.OnceTime(true)
|
|
473
|
+
.CommandBuilder();
|
|
474
|
+
EngineBridge.GetInstance().CallHandler(command);
|
|
475
|
+
}
|
|
443
476
|
}
|
|
444
477
|
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 8fe15c95a67d94bd39e81410fb2a06f3
|
|
3
|
+
PluginImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
iconMap: {}
|
|
7
|
+
executionOrder: {}
|
|
8
|
+
defineConstraints: []
|
|
9
|
+
isPreloaded: 0
|
|
10
|
+
isOverridable: 0
|
|
11
|
+
isExplicitlyReferenced: 0
|
|
12
|
+
validateReferences: 1
|
|
13
|
+
platformData:
|
|
14
|
+
- first:
|
|
15
|
+
Android: Android
|
|
16
|
+
second:
|
|
17
|
+
enabled: 1
|
|
18
|
+
settings: {}
|
|
19
|
+
- first:
|
|
20
|
+
Any:
|
|
21
|
+
second:
|
|
22
|
+
enabled: 0
|
|
23
|
+
settings: {}
|
|
24
|
+
- first:
|
|
25
|
+
Editor: Editor
|
|
26
|
+
second:
|
|
27
|
+
enabled: 0
|
|
28
|
+
settings:
|
|
29
|
+
DefaultValueInitialized: true
|
|
30
|
+
userData:
|
|
31
|
+
assetBundleName:
|
|
32
|
+
assetBundleVariant:
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
NS_ASSUME_NONNULL_BEGIN
|
|
8
8
|
|
|
9
9
|
typedef NS_ENUM(NSInteger,XDGUserStateChangeCode) {
|
|
10
|
+
XDGUserStateChangeCodeSupportNoUnread = 4, // customer service has no unread messages
|
|
11
|
+
XDGUserStateChangeCodeSupportHasUnread = 5, // customer service has unread messages
|
|
10
12
|
XDGUserStateChangeCodeLogout = 0x9001, // user logout
|
|
11
13
|
XDGUserStateChangeCodeBindSuccess = 0x1001, // user bind success,msg = entry type in string,eg: @"TAPTAP"
|
|
12
14
|
XDGUserStateChangeCodeUnBindSuccess = 0x1002, // user unbind success,msg = entry type in string
|
|
@@ -63,6 +65,14 @@ typedef void (^XDGUserStatusChangeCallback)(XDGUserStateChangeCode userStateChan
|
|
|
63
65
|
/// @param roleInfo 角色信息
|
|
64
66
|
+ (void)openUserDashboardWithInfo:(XDGRoleInfo *_Nullable)roleInfo;
|
|
65
67
|
|
|
68
|
+
/// 打开客服
|
|
69
|
+
/// @param roleInfo 角色信息
|
|
70
|
+
/// @param path 客服路径
|
|
71
|
+
/// @param params 自定义透传参数
|
|
72
|
+
+ (void)openCustomerService:(XDGRoleInfo *_Nullable)roleInfo
|
|
73
|
+
path:(NSString *_Nullable)path
|
|
74
|
+
params:(NSDictionary *_Nullable)params;
|
|
75
|
+
|
|
66
76
|
/// 打开注销页面
|
|
67
77
|
+ (void)accountCancellation;
|
|
68
78
|
|
|
@@ -25,6 +25,10 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
25
25
|
|
|
26
26
|
+ (void)openUserCenter;
|
|
27
27
|
|
|
28
|
+
+ (void)openCustomerService:(NSDictionary * _Nullable)roleInfo
|
|
29
|
+
path:(NSString * _Nullable)path
|
|
30
|
+
params:(NSString * _Nullable)params;
|
|
31
|
+
|
|
28
32
|
+ (void)loginType:(NSString *)loginType bridgeCallback:(void (^)(NSString * _Nonnull))callback;
|
|
29
33
|
|
|
30
34
|
+ (void)accountCancellation;
|
|
@@ -13,9 +13,12 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
13
13
|
|
|
14
14
|
@property (nonatomic, nullable, copy) NSString *roleId;
|
|
15
15
|
@property (nonatomic, nullable, copy) NSString *roleName;
|
|
16
|
+
@property (nonatomic, assign) NSInteger roleLevel;
|
|
16
17
|
@property (nonatomic, nullable, copy) NSString *serverId;
|
|
17
18
|
@property (nonatomic, nullable, copy) NSString *extra;
|
|
18
19
|
|
|
20
|
+
+ (XDGRoleInfo *_Nullable)createWithDictionary:(NSDictionary *_Nullable)dict;
|
|
21
|
+
|
|
19
22
|
- (NSDictionary *)toDictionary;
|
|
20
23
|
@end
|
|
21
24
|
|
|
Binary file
|
|
Binary file
|
package/Runtime/IXDGAccount.cs
CHANGED
package/Runtime/XDGAccount.cs
CHANGED
|
@@ -101,6 +101,17 @@ namespace XD.SDK.Account
|
|
|
101
101
|
platformWrapper.OpenUserDashboard(roleInfo);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/// <summary>
|
|
105
|
+
/// 打开平台客服页面
|
|
106
|
+
/// </summary>
|
|
107
|
+
/// <param name="roleInfo">角色信息</param>
|
|
108
|
+
/// <param name="path">客服路径,可空</param>
|
|
109
|
+
/// <param name="paramsMap">客服自定义透传参数,可空</param>
|
|
110
|
+
public static void OpenCustomerService(XDGRoleInfo roleInfo, string path, Dictionary<string, object> paramsMap)
|
|
111
|
+
{
|
|
112
|
+
platformWrapper.OpenCustomerService(roleInfo, path, paramsMap);
|
|
113
|
+
}
|
|
114
|
+
|
|
104
115
|
public static void SecurityPwdSetUp(Action<XDGSecurityPasswordResults, XDGError> callback)
|
|
105
116
|
{
|
|
106
117
|
XDGAccountUnified.SecurityPwdSetUp(callback);
|
package/Runtime/XDGRoleInfo.cs
CHANGED
|
@@ -10,7 +10,12 @@ namespace XD.SDK.Account
|
|
|
10
10
|
/// Game Role Name. required
|
|
11
11
|
/// </summary>
|
|
12
12
|
public string roleName;
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
/// <summary>
|
|
15
|
+
/// Game Role Level. optional (默认 0)
|
|
16
|
+
/// </summary>
|
|
17
|
+
public int roleLevel;
|
|
18
|
+
|
|
14
19
|
/// <summary>
|
|
15
20
|
/// Game Server ID. required
|
|
16
21
|
/// </summary>
|
package/package.json
CHANGED
|
Binary file
|
|
File without changes
|