feat: 完善安装部署与数字溯源码

This commit is contained in:
Nixevol
2026-07-06 23:26:21 +08:00
parent 7480e4d256
commit 7c6b0bff4c
59 changed files with 2174 additions and 166 deletions
+3 -2
View File
@@ -8,7 +8,8 @@ export const QUEUE_NAMES = {
RESTORE: 'restore',
} as const;
export const SHORT_CODE_LENGTH = 10;
export const SHORT_CODE_LENGTH = 12;
export const TRACE_CODE_PATTERN = /^\d{12}$/;
export const MAX_IMAGE_SIZE = 10 * 1024 * 1024;
export const MAX_VIDEO_SIZE = 100 * 1024 * 1024;
@@ -31,7 +32,7 @@ export const OUTBOUND_IMPORT_COLUMNS: ImportColumn[] = [
header: '追溯码',
required: true,
note: '必填,生码导出文件中的追溯码,定位到具体一件作品。',
example: 'a8K3pQ9x2M',
example: '482630790612',
},
{
key: 'batchNo',
+4
View File
@@ -39,6 +39,10 @@ export const ErrorCode = {
export type ErrorCodeValue = (typeof ErrorCode)[keyof typeof ErrorCode];
export const ErrorMessageKey: Record<number, string> = Object.fromEntries(
Object.entries(ErrorCode).map(([key, value]) => [value, `error.${key}`]),
) as Record<number, string>;
// 后端默认中文兜底文案(前端优先用 i18n,缺失时回退此文案)。
export const ErrorMessage: Record<number, string> = {
[ErrorCode.SUCCESS]: '成功',
+2
View File
@@ -3,6 +3,8 @@
export interface ApiResponse<T = unknown> {
code: number;
message: string;
messageKey?: string;
params?: Record<string, unknown>;
data: T | null;
}