feat: 配方卡片加入上传个人二维码功能 #5

Merged
hera merged 23 commits from feature/qr-upload-hint into main 2026-04-08 22:09:30 +00:00
Showing only changes of commit de74ffe638 - Show all commits

View File

@@ -39,18 +39,19 @@
<!-- Card image (rendered by html2canvas) -->
<div v-show="!cardImageUrl" ref="cardRef" class="export-card">
<!-- Brand overlay layers -->
<img
<div
v-if="brand.brand_bg"
:src="brand.brand_bg"
class="card-brand-bg"
crossorigin="anonymous"
/>
<img
v-if="brand.qr_code"
:src="brand.qr_code"
class="card-qr"
crossorigin="anonymous"
:style="{ backgroundImage: `url('${brand.brand_bg}')` }"
/>
<div v-if="brand.qr_code" class="card-qr-wrapper">
<img
:src="brand.qr_code"
class="card-qr"
crossorigin="anonymous"
/>
<div v-if="brand.brand_name" class="card-qr-name">{{ brand.brand_name }}</div>
</div>
<img
v-if="brand.brand_logo"
:src="brand.brand_logo"
@@ -997,32 +998,52 @@ async function saveRecipe() {
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
opacity: 0.06;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
opacity: 0.12;
z-index: 0;
pointer-events: none;
}
.card-qr {
.card-qr-wrapper {
position: absolute;
top: 16px;
right: 16px;
width: 64px;
height: 64px;
object-fit: contain;
z-index: 3;
opacity: 0.85;
top: 36px;
right: 24px;
display: flex;
flex-direction: column;
align-items: center;
gap: 3px;
z-index: 2;
}
.card-qr {
width: 54px;
height: 54px;
object-fit: cover;
border-radius: 6px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.card-qr-name {
font-size: 7px;
color: var(--text-light, #8a7a6a);
text-align: center;
line-height: 1.3;
max-width: 68px;
white-space: pre-line;
}
.card-logo {
position: absolute;
bottom: 16px;
bottom: 60px;
left: 50%;
transform: translateX(-50%);
height: 28px;
height: 60px;
object-fit: contain;
z-index: 3;
opacity: 0.3;
z-index: 1;
opacity: 0.2;
pointer-events: none;
}
.card-brand-text {