From 7abc2196598d54c7a9adbdd672551c6ae34e9176 Mon Sep 17 00:00:00 2001 From: Hera Zhao Date: Mon, 13 Apr 2026 15:13:37 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=B2=BE=E6=B2=B9=E4=BB=B7=E7=9B=AE?= =?UTF-8?q?=E6=81=A2=E5=A4=8D=E5=8E=9F=E5=A7=8B=E6=98=BE=E7=A4=BA(?= =?UTF-8?q?=E6=AF=8F=E6=BB=B4/=E6=AF=8Fml/=E6=AF=8F=E9=A2=97)=EF=BC=8Cml?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E7=94=A8=E6=96=B0=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 精油: 总滴数 + 每滴价格 + 每ml价格(和之前一样) 植物空胶囊: /颗(和之前一样) ml产品: 总容量Xml + 每ml价格(新) Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/views/OilReference.vue | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/OilReference.vue b/frontend/src/views/OilReference.vue index d928f5d..dd95487 100644 --- a/frontend/src/views/OilReference.vue +++ b/frontend/src/views/OilReference.vue @@ -146,9 +146,9 @@
¥{{ getMeta(name).retailPrice }}/瓶
@@ -172,7 +172,7 @@
¥ {{ (getMeta(activeCardName).bottlePrice || 0).toFixed(2) }} - · ¥ {{ oils.pricePerDrop(activeCardName).toFixed(4) }}/{{ oils.unitLabel(activeCardName) }} + · ¥ {{ oils.pricePerDrop(activeCardName).toFixed(4) }}/{{ oilPriceUnit(activeCardName) }}
@@ -242,6 +242,10 @@ 零售价 ¥ {{ getMeta(selectedOilName).retailPrice.toFixed(2) }} +
+ 每ml价格 + {{ oils.pricePerDrop(selectedOilName) ? ('¥ ' + (oils.pricePerDrop(selectedOilName) * DROPS_PER_ML).toFixed(2)) : '--' }} +

含此精油的配方

@@ -468,6 +472,12 @@ for (const [ml, drops] of Object.entries(VOLUME_OPTIONS)) { DROPS_TO_VOLUME[drops] = ml + 'ml' } +function oilPriceUnit(name) { + if (oils.isMlUnit(name)) return 'ml' + if (name === '植物空胶囊') return '颗' + return '滴' +} + function volumeLabel(dropCount, name) { if (dropCount === 160) return '160颗' if (oils.isMlUnit(name)) return dropCount + 'ml'