diff --git a/frontend/src/components/RecipeDetailOverlay.vue b/frontend/src/components/RecipeDetailOverlay.vue index 9ca9926..0584d54 100644 --- a/frontend/src/components/RecipeDetailOverlay.vue +++ b/frontend/src/components/RecipeDetailOverlay.vue @@ -55,12 +55,12 @@ class="card-brand-bg" :style="{ backgroundImage: `url('${brand.brand_bg}')` }" /> + +
+ +
{{ brand.brand_name }}
+
- -
- -
{{ brand.brand_name }}
-
{{ cardLang === 'en' ? 'doTERRA · Gifts of the Earth' : 'doTERRA · 来自大地的礼物' }}
@@ -1122,6 +1122,7 @@ async function saveRecipe() { .card-content { position: relative; z-index: 2; + padding-right: 70px; /* leave room for QR */ } /* Brand overlays */ @@ -1138,14 +1139,15 @@ async function saveRecipe() { pointer-events: none; } -.card-qr-float { - float: right; +.card-qr-wrapper { + position: absolute; + top: 36px; + right: 36px; display: flex; flex-direction: column; align-items: center; gap: 3px; - margin-left: 12px; - margin-bottom: 8px; + z-index: 3; } .card-qr { diff --git a/frontend/src/views/MyDiary.vue b/frontend/src/views/MyDiary.vue index ef1ad36..28ec645 100644 --- a/frontend/src/views/MyDiary.vue +++ b/frontend/src/views/MyDiary.vue @@ -170,24 +170,28 @@
- - - + +
+ +
{{ brandName }}
+
+
doTERRA · 来自大地的礼物
配方名称
薰衣草 · 乳香 · 茶树
-
配方总成本   ¥12.50
+
+ 配方总成本 + ¥12.50 +
制作日期:{{ new Date().toLocaleDateString('zh-CN') }}
- -
{{ brandName }}
@@ -1064,17 +1068,31 @@ async function applyBusiness() { .card-preview-content { position: relative; z-index: 1; - padding-right: 50px; /* leave room for QR */ + padding-right: 60px; /* leave room for QR area */ } -.card-preview-qr { +.card-preview-qr-area { position: absolute; top: 16px; right: 16px; + display: flex; + flex-direction: column; + align-items: center; + gap: 2px; + z-index: 2; + max-width: 50px; +} +.card-preview-qr { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; - z-index: 2; +} +.card-preview-qr-text { + font-size: 6px; + color: var(--text-light); + line-height: 1.2; + word-break: break-all; + max-width: 50px; } .card-preview-cost { position: relative; @@ -1109,14 +1127,7 @@ async function applyBusiness() { color: var(--text-light); letter-spacing: 0.5px; } -.card-preview-brand { - position: relative; - z-index: 1; - margin-top: 4px; - font-size: 8px; - color: var(--text-light); - white-space: pre-line; -} +/* brand name now inside .card-preview-qr-text */ .hint-text { font-size: 13px; diff --git a/frontend/src/views/RecipeSearch.vue b/frontend/src/views/RecipeSearch.vue index 585148f..a6de34a 100644 --- a/frontend/src/views/RecipeSearch.vue +++ b/frontend/src/views/RecipeSearch.vue @@ -174,7 +174,7 @@ onMounted(async () => { if (openRecipeId) { router.replace({ path: '/', query: {} }) const tryOpen = () => { - const idx = recipeStore.recipes.findIndex(r => r._id === openRecipeId) + const idx = recipeStore.recipes.findIndex(r => String(r._id) === String(openRecipeId)) if (idx >= 0) { openDetail(idx) return true