完成单个成就状态修改

close #60
This commit is contained in:
BTMuli
2023-11-18 21:51:04 +08:00
parent 312436b4e2
commit 1d3b1ae78e
2 changed files with 84 additions and 49 deletions

View File

@@ -39,6 +39,22 @@ export function timestampToDate(timestamp: number): string {
});
}
/**
* @description 获取当前时间, YY-MM-DD HH:MM:SS
* @since Beta v0.3.6
* @returns {string} 当前时间
*/
export function getNowStr(): string {
const now = new Date();
const year = now.getFullYear();
const month = (now.getMonth() + 1).toString().padStart(2, "0");
const date = now.getDate().toString().padStart(2, "0");
const hour = now.getHours().toString().padStart(2, "0");
const minute = now.getMinutes().toString().padStart(2, "0");
const second = now.getSeconds().toString().padStart(2, "0");
return `${year}-${month}-${date} ${hour}:${minute}:${second}`;
}
/**
* @description 获取设备信息(初始化时)
* @since Beta v0.3.6