fix: 修复 ABTestManager 的解析错误.
							parent
							
								
									0888bc4658
								
							
						
					
					
						commit
						135a0ac23b
					
				|  | @ -1,10 +1,11 @@ | |||
| 
 | ||||
| namespace Guru | ||||
| { | ||||
|     using System.Linq; | ||||
|     using System; | ||||
|     using System.Collections.Generic; | ||||
|     using Firebase.RemoteConfig; | ||||
|     using Guru.LitJson; | ||||
|     using Newtonsoft.Json; | ||||
|     using UnityEngine; | ||||
|      | ||||
|     /// <summary> | ||||
|  | @ -12,7 +13,7 @@ namespace Guru | |||
|     /// </summary> | ||||
|     public class ABTestManager : Singleton<ABTestManager> | ||||
|     { | ||||
|         public const string Version = "1.0.0"; | ||||
|         public const string Version = "1.0.2"; | ||||
|         private FirebaseRemoteConfig _remoteConfig; | ||||
|         private List<ABParamData> _params; | ||||
|          | ||||
|  | @ -51,10 +52,13 @@ namespace Guru | |||
|              | ||||
|             _remoteConfig = FirebaseRemoteConfig.DefaultInstance; | ||||
|              | ||||
|             Debug.Log($"[AB] --- remoteConfig Counts: {_remoteConfig.Keys.Count()}"); | ||||
|              | ||||
|             string strValue; | ||||
|             foreach (var key in _remoteConfig.Keys) | ||||
|             { | ||||
|                 strValue = _remoteConfig.GetValue(key).StringValue; | ||||
|                 Debug.Log($"[AB] --- raw config: [{key}] : {strValue}"); | ||||
|                 AddParam(strValue); | ||||
|             } | ||||
|              | ||||
|  | @ -135,7 +139,8 @@ namespace Guru | |||
|             try | ||||
|             { | ||||
|                 // 发现Guru AB测试标志位 | ||||
|                 var dict = JsonMapper.ToObject<Dictionary<string, JsonData>>(value); | ||||
|                 // var dict = JsonMapper.ToObject<Dictionary<string, JsonData>>(value); | ||||
|                 var dict =  JsonConvert.DeserializeObject<Dictionary<string, object>>(value); | ||||
|                 if (null != dict) | ||||
|                 { | ||||
|                     foreach (var k in dict.Keys) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue