add:新增同一个工单同一人可以多次拼单

This commit is contained in:
2026-10-23 15:14:07 +08:00
parent bfd2325ac5
commit 1d5615f1ae
18 changed files with 2996 additions and 128 deletions
+8
View File
@@ -0,0 +1,8 @@
/** 客户端幂等键:一次用户点击一个,用于拼单参与/抢单的服务端去重。 */
export function createRequestId(prefix = 'req'): string {
const random =
typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function'
? crypto.randomUUID()
: `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`
return `${prefix}-${random}`
}