parent
0d47b48058
commit
629687b3a6
|
|
@ -24,5 +24,22 @@ namespace Guru
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 直接构建 JSON 串
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string BuildJson()
|
||||||
|
{
|
||||||
|
var config = Build().ToJson();
|
||||||
|
return config;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public string ToJson()
|
||||||
|
{
|
||||||
|
return $"{{\"firebaseAppInstanceId\":{firebaseAppInstanceId},\"idfa\":{idfa},\"adid\":{adid},\"gpsAdid\":{gpsAdid}}}";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -20,9 +20,10 @@ namespace Guru
|
||||||
var data = new Dictionary<string, object>()
|
var data = new Dictionary<string, object>()
|
||||||
{
|
{
|
||||||
["secret"] = IPMConfig.IPM_DEVICE_ID,
|
["secret"] = IPMConfig.IPM_DEVICE_ID,
|
||||||
["eventConfig"] = EventConfig.Build().ToString(),
|
["eventConfig"] = EventConfig.BuildJson(),
|
||||||
};
|
};
|
||||||
var json = JsonConvert.SerializeObject(data);
|
var json = JsonConvert.SerializeObject(data);
|
||||||
|
Debug.Log($"[SDK] --- AuthUserRequest json: {json}");
|
||||||
var request = new UnityWebRequest(RequestURL, "POST");
|
var request = new UnityWebRequest(RequestURL, "POST");
|
||||||
request.uploadHandler = new UploadHandlerRaw(Encoding.UTF8.GetBytes(json));
|
request.uploadHandler = new UploadHandlerRaw(Encoding.UTF8.GetBytes(json));
|
||||||
request.downloadHandler = new DownloadHandlerBuffer();
|
request.downloadHandler = new DownloadHandlerBuffer();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue