fix: 修正产品规格值product_spec的显示问题
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m8s
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m8s
- subItem.value => subItem.key - 调整后端CMS的结构,将规格值移入translations中
This commit is contained in:
@ -61,12 +61,13 @@ export function toProductSpecGroupView(
|
||||
export function toProductSpecView(raw: ProductSpec): ProductSpecView {
|
||||
const trans = raw.translations?.[0] ?? {
|
||||
key: '',
|
||||
value: '',
|
||||
};
|
||||
|
||||
return {
|
||||
id: raw.id,
|
||||
key: trans.key,
|
||||
value: raw.value,
|
||||
value: trans.value,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user