first commit

This commit is contained in:
2026-07-27 14:54:21 +08:00
commit 4d086758e8
161 changed files with 63776 additions and 0 deletions
+97
View File
@@ -0,0 +1,97 @@
/**
* 产品品类遮罩配置类型定义
* 修改产品尺寸时,只需调整 src/utils/productConfig.ts 中的 PRODUCTS 数组
*/
/** 矩形遮罩配置 */
export interface RectMask {
shape: 'rect'
/** 遮罩宽度 (px, 基于750设计稿) */
width: number
/** 遮罩高度 (px) */
height: number
/** 圆角半径 (px) */
borderRadius?: number
}
/** 圆形遮罩配置 */
export interface CircleMask {
shape: 'circle'
/** 遮罩宽度 (px) */
width: number
/** 遮罩高度 (px) */
height: number
}
export type MaskConfig = RectMask | CircleMask
/** 产品品类定义 */
export interface ProductCategory {
id: string
name: string
desc: string
icon: string
price: number // 单价(元)
leadTime: string // 工期描述
description: string // 商品详细介绍(长文本)
mask: MaskConfig
images: string[] // 商品实物照片路径列表(相对页面引用的路径)
}
/** 贴纸物品 */
export interface StickerItem {
id: string
src: string
x: number
y: number
scale: number
width: number
height: number
isOverlapping: boolean
}
/** 设计清单条目 */
export interface DesignItem {
id: string
productId: string
productName: string
productIcon: string
unitPrice: number
count: number
status: 'undesigned' | 'designing' | 'ordered'
designData?: {
/** 兼容旧版字段 */
imageSrc?: string
imagePos?: { x: number; y: number; scale: number }
/** 新版贴纸列表 */
stickers?: StickerItem[]
category?: ProductCategory
}
orderId?: string
createdAt: string
}
/** 订单条目 */
export interface OrderItem {
id: string
productName: string
productIcon: string
statusCode: 'pending' | 'paid' | 'shipping' | 'done'
date: string
price: string
count: number
sku: string
}
/** 编辑器中的图片状态(向后兼容) */
export interface ImageState {
id: string
src: string
x: number
y: number
scale: number
rotation: number
width: number
height: number
isOverlapping: boolean
}