feat: 完善安装部署与数字溯源码
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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]: '成功',
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
export interface ApiResponse<T = unknown> {
|
||||
code: number;
|
||||
message: string;
|
||||
messageKey?: string;
|
||||
params?: Record<string, unknown>;
|
||||
data: T | null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user