task-11: 拆分 dedupe 模块 API 至 types/modules/dedupe.ts(callJava+buildJavaUrl 化),java-modules.ts 改 re-export 保持旧 import 兼容
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
export function getCurrentUserId() {
|
||||
const raw =
|
||||
typeof window === "undefined"
|
||||
? ""
|
||||
: window.localStorage.getItem("uid") || "";
|
||||
const value = Number(raw);
|
||||
if (!Number.isFinite(value) || value <= 0) {
|
||||
throw new Error("未获取到用户ID");
|
||||
}
|
||||
return value;
|
||||
}
|
||||
Reference in New Issue
Block a user