顾海波

【修复】埋点时间

... ... @@ -135,10 +135,9 @@ class AutoTrackQueue {
if (host != null) {
List<Map> datas = [];
uploadList.forEach((event) {
for (var event in uploadList) {
Random random = Random.secure();
int id = random.nextInt(1 << 32); // 模拟 Java 的 nextInt()
final t = DateTime.now().millisecondsSinceEpoch;
String os = "";
String os_version = "";
... ... @@ -212,7 +211,7 @@ class AutoTrackQueue {
datas.add({
'_track_id': id,
'time': t,
'time': event.time,
'type': 'track',
'distinct_id':
config.userId ?? AutoTrackConfigManager.instance.deviceId,
... ... @@ -222,7 +221,7 @@ class AutoTrackQueue {
});
AutoTrackLogger.getInstance().debug('upload => data => $datas');
});
}
try {
final httpClient = HttpClient();
... ...