Optimize date response. Add system log table.

This commit is contained in:
2023-11-03 18:25:58 +08:00
parent bc196d4ba9
commit eadc74ca67
9 changed files with 190 additions and 36 deletions

View File

@@ -1,4 +1,5 @@
import { STORAGE_TOKEN_KEY, STORAGE_USER_INFO_KEY } from '@/constants/common.constants'
import moment from 'moment'
export const getQueryVariable = (variable: string) => {
const query = window.location.search.substring(1)
@@ -139,3 +140,7 @@ const randomColor = (start: number, end: number) => {
export const getRedirectUrl = (path: string, redirectUrl: string): string => {
return `${path}?redirect=${encodeURIComponent(redirectUrl)}`
}
export const getLocalTime = (utcTime: string, format: string = 'yyyy-MM-DD HH:mm:ssZ') => {
return moment.utc(utcTime).local().format(format)
}