小写匹配
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 Newtonsoft.Json;
|
||||
using UnityEngine;
|
||||
using WZ;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
public class AdjustTrackEvent : D_MonoSingleton<AdjustTrackEvent>
|
||||
{
|
||||
|
@ -21,26 +22,29 @@ public class AdjustTrackEvent : D_MonoSingleton<AdjustTrackEvent>
|
|||
return null;
|
||||
}
|
||||
|
||||
return eventTokenMap.GetValueOrDefault(eventName, null);
|
||||
return eventTokenMap.GetValueOrDefault(eventName.ToLower(), null);
|
||||
}
|
||||
|
||||
public void UpdateEventToken()
|
||||
{
|
||||
var remoteConfigString = FireBaseRemoteConfigManager.Instance.GetRemoteConfigString("event_adjust_set");
|
||||
if (string.IsNullOrEmpty(remoteConfigString)) return;
|
||||
|
||||
var deserializeObject = JsonConvert.DeserializeObject<Dictionary<string, string>>(remoteConfigString);
|
||||
if (eventTokenMap == null)
|
||||
{
|
||||
eventTokenMap = deserializeObject;
|
||||
}
|
||||
else
|
||||
|
||||
try
|
||||
{
|
||||
var deserializeObject = JsonConvert.DeserializeObject<Dictionary<string, string>>(remoteConfigString);
|
||||
|
||||
eventTokenMap ??= new Dictionary<string, string>();
|
||||
|
||||
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>
|
||||
|
|
Loading…
Reference in New Issue