小写匹配
This commit is contained in:
parent
e61b11be7b
commit
cc87691051
|
@ -1,8 +1,9 @@
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using AdjustSdk;
|
using AdjustSdk;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using UnityEngine;
|
|
||||||
using WZ;
|
using WZ;
|
||||||
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
public class AdjustTrackEvent : D_MonoSingleton<AdjustTrackEvent>
|
public class AdjustTrackEvent : D_MonoSingleton<AdjustTrackEvent>
|
||||||
{
|
{
|
||||||
|
@ -21,7 +22,7 @@ public class AdjustTrackEvent : D_MonoSingleton<AdjustTrackEvent>
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return eventTokenMap.GetValueOrDefault(eventName, null);
|
return eventTokenMap.GetValueOrDefault(eventName.ToLower(), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateEventToken()
|
public void UpdateEventToken()
|
||||||
|
@ -29,18 +30,21 @@ public class AdjustTrackEvent : D_MonoSingleton<AdjustTrackEvent>
|
||||||
var remoteConfigString = FireBaseRemoteConfigManager.Instance.GetRemoteConfigString("event_adjust_set");
|
var remoteConfigString = FireBaseRemoteConfigManager.Instance.GetRemoteConfigString("event_adjust_set");
|
||||||
if (string.IsNullOrEmpty(remoteConfigString)) return;
|
if (string.IsNullOrEmpty(remoteConfigString)) return;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
var deserializeObject = JsonConvert.DeserializeObject<Dictionary<string, string>>(remoteConfigString);
|
var deserializeObject = JsonConvert.DeserializeObject<Dictionary<string, string>>(remoteConfigString);
|
||||||
if (eventTokenMap == null)
|
|
||||||
{
|
eventTokenMap ??= new Dictionary<string, string>();
|
||||||
eventTokenMap = deserializeObject;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach (var keyValuePair in deserializeObject)
|
foreach (var keyValuePair in deserializeObject)
|
||||||
{
|
{
|
||||||
eventTokenMap[keyValuePair.Key] = keyValuePair.Value;
|
eventTokenMap[keyValuePair.Key.ToLower()] = keyValuePair.Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
LoggerUtils.Error("event_adjust_set 转化失败");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue