merge: integrate catalog into order payment flow
This commit is contained in:
@@ -95,6 +95,18 @@
|
||||
font-variant: tabular-nums;
|
||||
}
|
||||
|
||||
.shop-feedback {
|
||||
display: block;
|
||||
padding: 48rpx 24rpx;
|
||||
text-align: center;
|
||||
color: var(--text-secondary);
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.shop-feedback-action {
|
||||
color: var(--accent-primary);
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
Responsive: container center on wide screens
|
||||
============================================================ */
|
||||
|
||||
@@ -44,6 +44,10 @@ export interface ProductCategory {
|
||||
specs?: [string, string][] // 规格参数键值对
|
||||
mask: MaskConfig
|
||||
images: string[] // 商品实物照片路径列表(相对页面引用的路径)
|
||||
/** 服务端商品目录字段;本地兜底数据可不填。 */
|
||||
status?: 'ON_SALE'
|
||||
sort?: number
|
||||
categoryId?: string
|
||||
}
|
||||
|
||||
/** 贴纸物品 */
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { ProductCategory } from '../types'
|
||||
import type { ProductDto } from './api/product'
|
||||
|
||||
/**
|
||||
* 将商品目录接口数据适配为现有 DIY/设计清单仍在使用的商品模型。
|
||||
* 页面只从接口读取商品;本适配层避免把后端字段差异散落到各个页面。
|
||||
*/
|
||||
export function toProductCategory(product: ProductDto): ProductCategory {
|
||||
return {
|
||||
id: product.id,
|
||||
name: product.name,
|
||||
desc: product.subtitle || product.description || '',
|
||||
icon: product.iconImg || '',
|
||||
iconImg: product.iconImg,
|
||||
price: product.price,
|
||||
originalPrice: product.originalPrice,
|
||||
leadTime: product.leadTime,
|
||||
description: product.description || product.subtitle || '',
|
||||
subtitle: product.subtitle,
|
||||
tone: product.tone,
|
||||
story: product.story,
|
||||
scene: product.scene,
|
||||
tags: product.tags,
|
||||
specs: product.specs,
|
||||
mask: product.mask,
|
||||
images: product.images,
|
||||
status: product.status,
|
||||
sort: product.sort,
|
||||
categoryId: product.categoryId,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user