From 395e837de8c9cee1c4f660017d35ca38b13b9486 Mon Sep 17 00:00:00 2001 From: Hera Zhao Date: Mon, 13 Apr 2026 15:19:32 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=B2=BE=E6=B2=B9=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E9=87=8D=E6=8E=92=20=E2=80=94=20=E6=80=BB?= =?UTF-8?q?=E5=AE=B9=E9=87=8F(5ml/93=E6=BB=B4)+=E4=BC=9A=E5=91=98=E6=AF=8F?= =?UTF-8?q?=E6=BB=B4+=E9=9B=B6=E5=94=AE=E6=AF=8F=E6=BB=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 精油: 总容量(Xml/X滴) → 会员价 → 每滴价格 → 零售价 → 零售每滴价格 ml产品: 总容量(Xml) → 会员价 → 每ml价格 配方列表单位跟随产品类型 Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/views/OilReference.vue | 71 ++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 22 deletions(-) diff --git a/frontend/src/views/OilReference.vue b/frontend/src/views/OilReference.vue index dd95487..d5c21ec 100644 --- a/frontend/src/views/OilReference.vue +++ b/frontend/src/views/OilReference.vue @@ -226,32 +226,50 @@
-
- 会员价 - {{ getMeta(selectedOilName)?.bottlePrice != null ? ('¥ ' + getMeta(selectedOilName).bottlePrice.toFixed(2)) : '--' }} -
-
- {{ oils.isMlUnit(selectedOilName) ? '总容量' : '总滴数' }} - {{ getMeta(selectedOilName)?.dropCount || '--' }}{{ oils.isMlUnit(selectedOilName) ? 'ml' : '' }} -
-
- 每{{ oils.unitLabel(selectedOilName) }}价格 - {{ oils.pricePerDrop(selectedOilName) ? ('¥ ' + oils.pricePerDrop(selectedOilName).toFixed(4)) : '--' }} -
-
- 零售价 - ¥ {{ getMeta(selectedOilName).retailPrice.toFixed(2) }} -
-
- 每ml价格 - {{ oils.pricePerDrop(selectedOilName) ? ('¥ ' + (oils.pricePerDrop(selectedOilName) * DROPS_PER_ML).toFixed(2)) : '--' }} -
+ + + + -

含此精油的配方

+

含此{{ oils.isMlUnit(selectedOilName) ? '产品' : '精油' }}的配方

{{ r.name }} - {{ getDropsForOil(r, selectedOilName) }}滴 + {{ getDropsForOil(r, selectedOilName) }}{{ oils.unitLabel(selectedOilName) }}
暂无使用此精油的配方
@@ -472,6 +490,15 @@ for (const [ml, drops] of Object.entries(VOLUME_OPTIONS)) { DROPS_TO_VOLUME[drops] = ml + 'ml' } +function volumeWithDrops(name) { + const meta = getMeta(name) + if (!meta || !meta.dropCount) return '--' + if (name === '植物空胶囊') return meta.dropCount + '颗' + const ml = DROPS_TO_VOLUME[meta.dropCount] + if (ml) return `${ml}/${meta.dropCount}滴` + return meta.dropCount + '滴' +} + function oilPriceUnit(name) { if (oils.isMlUnit(name)) return 'ml' if (name === '植物空胶囊') return '颗'