refactor axios.

This commit is contained in:
2023-01-08 14:42:54 +08:00
parent 7bea386dbc
commit e306e6b463
16 changed files with 270 additions and 113 deletions

View File

@@ -1,3 +1,4 @@
import { useDateFormat } from "@vueuse/core"
import { STORAGE_KEY } from "./constants"
export function getACRate(acCount: number, totalCount: number) {
@@ -32,3 +33,8 @@ export function getTagColor(tag: string) {
: "danger",
}[tag]
}
export function parseTime(utc: Date, format = "YYYY年M月D日") {
const time = useDateFormat(utc, format, { locales: "zh-CN" })
return time.value
}