20260723173317

This commit is contained in:
oneao committed 2026-07-23 17:33:18 +08:00
1 parent 59b3ccfb1c
commit 5f73b54802
33 files changed
+3064 -2108

No files matched your search

+5 -4
View File
@@ -89,11 +89,12 @@ export function saveObjectApi(requests) {
}
/**
* 获取下一个雪花 ID。
* @returns {Promise<ApiResult<string>>} 取号响应,雪花 ID 使用字符串避免精度丢失。
* 获取下一个雪花 ID;传入 count 可批量获取指定数量的 ID(返回数组)。
* @param {number} [count=1] 需要获取的 ID 数量,缺省 1。
* @returns {Promise<ApiResult<string|string[]>>} count 为 1 时 data 为单个 ID 字符串,大于 1 时为 ID 字符串数组。
*/
export function nextIdApi() {
return get("/data/nextid");
export function nextIdApi(count = 1) {
return get("/data/nextid", { params: { count } });
}
/**