更新音源API (#1352)

* 更新API

---------

Co-authored-by: lyswhut <lyswhut@qq.com>
This commit is contained in:
Folltoshe
2023-04-29 15:09:17 +08:00
committed by GitHub
co-authored by lyswhut
parent 200ca1eeda
commit 908815def3
36 changed files with 1422 additions and 207 deletions
+11
View File
@@ -5,6 +5,17 @@ export * from '@common/utils/nodejs'
export * from '@common/utils/common'
export * from '@common/utils/tools'
/**
* 格式化播放数量
* @param {*} num 数字
*/
export const formatPlayCount = (num: number): string => {
if (num > 100000000) return `${Math.trunc(num / 10000000) / 10}亿`
if (num > 10000) return `${Math.trunc(num / 1000) / 10}万`
return String(num)
}
/**
* 时间格式化
*/