|
@@ -2,6 +2,7 @@
|
|
using ET;
|
|
using ET;
|
|
using UnityEngine;
|
|
using UnityEngine;
|
|
using GFGGame.Launcher;
|
|
using GFGGame.Launcher;
|
|
|
|
+using Unity.Plastic.Newtonsoft.Json;
|
|
|
|
|
|
namespace GFGGame
|
|
namespace GFGGame
|
|
{
|
|
{
|
|
@@ -148,14 +149,20 @@ namespace GFGGame
|
|
/// <param name="message">resUid + "|gfg|" + token</param>
|
|
/// <param name="message">resUid + "|gfg|" + token</param>
|
|
public void LoginSuccessAb(string message)
|
|
public void LoginSuccessAb(string message)
|
|
{
|
|
{
|
|
|
|
+
|
|
Debug.Log("Game.HotUpdate ios LoginSuccessAb: " + message);
|
|
Debug.Log("Game.HotUpdate ios LoginSuccessAb: " + message);
|
|
- string[] result = message.Split(new string[] { "|gfg|" }, StringSplitOptions.None);
|
|
|
|
|
|
+ DouYouIosSdkLoginResModel douYouIosSdkLoginResModel = JsonConvert.DeserializeObject<DouYouIosSdkLoginResModel>(message);
|
|
|
|
+ if (douYouIosSdkLoginResModel == null)
|
|
|
|
+ {
|
|
|
|
+ Log.Error($"注意,解析登录回调失败,回调的字符串为 {message} douYouIosSdkLoginResModel is null.");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
|
|
QDDouYouManagerIos.Instance.isLogining = false;
|
|
QDDouYouManagerIos.Instance.isLogining = false;
|
|
- QDDouYouManagerIos.Instance.uid = result[0];
|
|
|
|
- QDDouYouManagerIos.Instance.token = result[1];
|
|
|
|
|
|
+ QDDouYouManagerIos.Instance.uid = douYouIosSdkLoginResModel.uid;
|
|
|
|
+ QDDouYouManagerIos.Instance.token = douYouIosSdkLoginResModel.token;
|
|
//登录成功的回调
|
|
//登录成功的回调
|
|
- EventAgent.DispatchEvent(ConstMessage.ON_PLATFORM_SDK_LOGINED, result[0]);
|
|
|
|
|
|
+ EventAgent.DispatchEvent(ConstMessage.ON_PLATFORM_SDK_LOGINED, douYouIosSdkLoginResModel.uid);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|