mirror of
https://github.com/PlayEdu/backend
synced 2026-03-10 14:40:40 +08:00
resolve conflict
This commit is contained in:
@@ -15,3 +15,13 @@ export function clearToken() {
|
||||
export function dateFormat(dateStr: string) {
|
||||
return moment(dateStr).format("YYYY-MM-DD HH:mm");
|
||||
}
|
||||
|
||||
export const generateUUID = (): string => {
|
||||
var guid = "";
|
||||
for (var i = 1; i <= 32; i++) {
|
||||
var n = Math.floor(Math.random() * 16.0).toString(16);
|
||||
guid += n;
|
||||
if (i == 8 || i == 12 || i == 16 || i == 20) guid += "-";
|
||||
}
|
||||
return guid;
|
||||
};
|
||||
Reference in New Issue
Block a user