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 '颗'