mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix:error
This commit is contained in:
@@ -11,6 +11,7 @@ export class UmamiTraceCore {
|
|||||||
hostname: string = 'trace.napneko.icu';
|
hostname: string = 'trace.napneko.icu';
|
||||||
ua: string = '';
|
ua: string = '';
|
||||||
workname: string = 'default';
|
workname: string = 'default';
|
||||||
|
bootTime = Date.now();
|
||||||
init(qqversion: string, guid: string, workname: string) {
|
init(qqversion: string, guid: string, workname: string) {
|
||||||
this.qqversion = qqversion;
|
this.qqversion = qqversion;
|
||||||
this.workname = workname;
|
this.workname = workname;
|
||||||
@@ -43,8 +44,12 @@ export class UmamiTraceCore {
|
|||||||
const data = {
|
const data = {
|
||||||
napcat_version: this.napcatVersion,
|
napcat_version: this.napcatVersion,
|
||||||
qq_version: this.qqversion,
|
qq_version: this.qqversion,
|
||||||
guid: guid,
|
napcat_working: this.workname,
|
||||||
workname: this.workname,
|
device_guid: this.guid,
|
||||||
|
device_platform: os.platform(),
|
||||||
|
device_arch: os.arch(),
|
||||||
|
boot_time: new Date(this.bootTime + 8 * 60 * 60 * 1000).toISOString().replace('T', ' ').substring(0, 19),
|
||||||
|
sys_time: new Date(Date.now() - os.uptime() * 1000 + 8 * 60 * 60 * 1000).toISOString().replace('T', ' ').substring(0, 19)
|
||||||
};
|
};
|
||||||
this.sendEvent(
|
this.sendEvent(
|
||||||
{
|
{
|
||||||
@@ -70,14 +75,7 @@ export class UmamiTraceCore {
|
|||||||
language: language || 'en-US',
|
language: language || 'en-US',
|
||||||
screen: '1920x1080',
|
screen: '1920x1080',
|
||||||
data: {
|
data: {
|
||||||
...data,
|
...data
|
||||||
napcat_version: this.napcatVersion,
|
|
||||||
qq_version: this.qqversion,
|
|
||||||
workname: this.workname,
|
|
||||||
guid: this.guid,
|
|
||||||
platform: os.platform(),
|
|
||||||
arch: os.arch(),
|
|
||||||
uptime: new Date(Date.now() - os.uptime() * 1000).toISOString().replace('T', ' ').substring(0, 19)
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.sendRequest(payload, type);
|
this.sendRequest(payload, type);
|
||||||
|
Reference in New Issue
Block a user