com.xd.sdk.account 7.2.1-alpha → 7.2.1-alpha.3

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.
@@ -4,6 +4,6 @@
4
4
  //
5
5
  // Created by Fattycat on 2023/4/14.
6
6
  //
7
- #define XDGAccount_VERSION @"7.2.0"
8
- #define XDSAccount_VERSION_CODE @"7020000"
9
- // HASH 8d15387e
7
+ #define XDGAccount_VERSION @"7.3.0"
8
+ #define XDSAccount_VERSION_CODE @"7030000"
9
+ // HASH e0ae45d9
@@ -116,11 +116,15 @@ namespace XD.SDK.Account.Internal.Standalone
116
116
  if (xdException.Code == ResponseCode.Account.TokenExpired || xdException.HttpStatusCode == 401)
117
117
  errorMsg = "XD_TOKEN_EXPIRED";
118
118
  // 触发风控以及登陆频繁不需要发送 PreFail
119
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
119
120
  if (xdException.Code != PhoneModule.INVALID_VERIFY_CODE &&
120
121
  xdException.Code != PhoneModule.LOGIN_REQUEST_FREQUENTLY)
121
122
  {
122
123
  AliyunTrack.LoginPreFail(errorMsg);
123
124
  }
125
+ #else
126
+ AliyunTrack.LoginPreFail(errorMsg);
127
+ #endif
124
128
 
125
129
  throw xdException;
126
130
  }
@@ -117,6 +117,7 @@ namespace XD.SDK.Account.Internal.Standalone
117
117
 
118
118
  public async void OpenUserDashboard(XDGRoleInfo roleInfo)
119
119
  {
120
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
120
121
  try
121
122
  {
122
123
  if (!XDGCommonInternal.IsCn())
@@ -184,6 +185,9 @@ namespace XD.SDK.Account.Internal.Standalone
184
185
  {
185
186
  XDGLogger.Error(new XDGError(ResponseCode.Common.Failed, e.Message), XDGLoggerTag.Account);
186
187
  }
188
+ #else
189
+ XDGLogger.Error("This function need vuplex enabled", XDGLoggerTag.Account);
190
+ #endif
187
191
  }
188
192
 
189
193
  public async void OpenAccountDeletion()
@@ -327,6 +331,7 @@ namespace XD.SDK.Account.Internal.Standalone
327
331
 
328
332
  private async Task CancelAccount()
329
333
  {
334
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
330
335
  var current = UserModule.current;
331
336
  if (current == null)
332
337
  {
@@ -389,6 +394,9 @@ namespace XD.SDK.Account.Internal.Standalone
389
394
  {
390
395
  UIManager.DismissLoading();
391
396
  }
397
+ #else
398
+ XDGLogger.Error("This function need vuplex enabled", XDGLoggerTag.Account);
399
+ #endif
392
400
  }
393
401
 
394
402
  private static async Task<XDGUser> InvokeXdgPaymentCheckRefundStatusWithUI(XDGUser user)
@@ -1,4 +1,4 @@
1
- #if UNITY_EDITOR || UNITY_STANDALONE
1
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.Threading.Tasks;
@@ -1,4 +1,4 @@
1
- #if UNITY_EDITOR || UNITY_STANDALONE
1
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.Threading.Tasks;
@@ -1,4 +1,4 @@
1
- #if UNITY_EDITOR || UNITY_STANDALONE
1
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.Threading.Tasks;
@@ -74,7 +74,11 @@ namespace XD.SDK.Account.Internal.Standalone
74
74
 
75
75
  if (xd)
76
76
  {
77
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
77
78
  WebRequest.OpenWebPage(url, (code, data) => { });
79
+ #else
80
+ Application.OpenURL(url);
81
+ #endif
78
82
  }
79
83
  else
80
84
  {
@@ -1,4 +1,4 @@
1
- #if UNITY_EDITOR || UNITY_STANDALONE
1
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using TMPro;
@@ -1,4 +1,4 @@
1
- #if UNITY_EDITOR || UNITY_STANDALONE
1
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.Linq;
@@ -1,4 +1,4 @@
1
- #if UNITY_EDITOR || UNITY_STANDALONE
1
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
2
2
  using System;
3
3
  using UnityEngine;
4
4
  using UnityEngine.UI;
@@ -1,4 +1,4 @@
1
- #if UNITY_EDITOR || UNITY_STANDALONE
1
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.Linq;
@@ -1,4 +1,4 @@
1
- #if UNITY_EDITOR || UNITY_STANDALONE
1
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
2
2
  using System;
3
3
  using System.Threading.Tasks;
4
4
  using System.Collections.Generic;
@@ -1,4 +1,4 @@
1
- #if UNITY_EDITOR || UNITY_STANDALONE
1
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
2
2
  using System;
3
3
  using System.Threading.Tasks;
4
4
  using System.Collections;
@@ -108,6 +108,7 @@ namespace XD.SDK.Account.Internal.Standalone
108
108
  if (loginType == LoginType.Phone)
109
109
  {
110
110
  AliyunTrack.ResetPhoneLoginData();
111
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
111
112
  if (XDGCommonInternal.IsCn())
112
113
  {
113
114
  await PhoneModule.Bind();
@@ -116,6 +117,9 @@ namespace XD.SDK.Account.Internal.Standalone
116
117
  {
117
118
  await PhoneModuleIO.LoginOrBind(false);
118
119
  }
120
+ #else
121
+ throw new XDGError(ResponseCode.Common.Failed, "This function need vuplex enabled");
122
+ #endif
119
123
 
120
124
  return;
121
125
  }
@@ -128,7 +132,11 @@ namespace XD.SDK.Account.Internal.Standalone
128
132
  }
129
133
  else
130
134
  {
135
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
131
136
  await EmailModule.LoginOrBind(false);
137
+ #else
138
+ throw new XDGError(ResponseCode.Common.Failed, "This function need vuplex enabled");
139
+ #endif
132
140
  }
133
141
 
134
142
  return;
@@ -143,6 +151,7 @@ namespace XD.SDK.Account.Internal.Standalone
143
151
  if (loginType == LoginType.Phone)
144
152
  {
145
153
  AliyunTrack.ResetPhoneLoginData();
154
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
146
155
  // 手机号解绑需要验证码
147
156
  if (XDGCommonInternal.IsCn())
148
157
  {
@@ -152,6 +161,9 @@ namespace XD.SDK.Account.Internal.Standalone
152
161
  {
153
162
  return PhoneModuleIO.Unbind(extras);
154
163
  }
164
+ #else
165
+ throw new XDGError(ResponseCode.Common.Failed, "This function need vuplex enabled");
166
+ #endif
155
167
  }
156
168
  else if (loginType == LoginType.Email)
157
169
  {
@@ -162,7 +174,11 @@ namespace XD.SDK.Account.Internal.Standalone
162
174
  }
163
175
  else
164
176
  {
177
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
165
178
  return EmailModule.Unbind(extras);
179
+ #else
180
+ throw new XDGError(ResponseCode.Common.Failed, "This function need vuplex enabled");
181
+ #endif
166
182
  }
167
183
  }
168
184
 
@@ -249,6 +265,7 @@ namespace XD.SDK.Account.Internal.Standalone
249
265
  {
250
266
  AliyunTrack.ResetPhoneLoginData();
251
267
  AliyunTrack.LoginEnableSDKLoginTrack();
268
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
252
269
  if (XDGCommonInternal.IsCn())
253
270
  {
254
271
  await PhoneModule.Login();
@@ -259,13 +276,21 @@ namespace XD.SDK.Account.Internal.Standalone
259
276
  }
260
277
 
261
278
  UIManager.ShowLoading();
279
+ #else
280
+ throw new XDGError(ResponseCode.Common.Failed, "This function need vuplex enabled");
281
+ #endif
262
282
  }
263
283
  else if (loginType == LoginType.Email)
264
284
  {
265
285
  AliyunTrack.ResetEmailLoginData();
266
286
  AliyunTrack.LoginEnableSDKLoginTrack();
287
+ #if (UNITY_EDITOR || UNITY_STANDALONE) && !XDSDK_DISABLE_VUPLEX
267
288
  await EmailModule.LoginOrBind(true);
268
289
  UIManager.ShowLoading();
290
+ #else
291
+ throw new XDGError(ResponseCode.Common.Failed, "This function need vuplex enabled");
292
+ #endif
293
+
269
294
  }
270
295
  else
271
296
  {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "com.xd.sdk.account",
3
3
  "displayName": "XDGSDK Account",
4
- "version": "7.2.1-alpha",
4
+ "version": "7.2.1-alpha.3",
5
5
  "description": "XDGSDK",
6
6
  "unity": "2019.3",
7
7
  "license": "MIT",
8
8
  "dependencies": {
9
- "com.xd.sdk.common": "7.2.1-alpha"
9
+ "com.xd.sdk.common": "7.2.1-alpha.3"
10
10
  }
11
11
  }