小程序二维码功能

This commit is contained in:
2026-07-12 23:59:52 +08:00
parent 1bd152073a
commit f2cdc0222d
10 changed files with 658 additions and 63 deletions
+223 -10
View File
@@ -54,6 +54,19 @@
line-height: 1.6;
}
.redeem-amount-foot {
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 var(--space-page) 12px;
}
.redeem-fill-max {
font-size: 13px;
color: var(--color-heritage-red);
font-weight: 600;
}
.redeem-submit {
margin: 24px var(--space-page);
height: 48px;
@@ -67,6 +80,25 @@
justify-content: center;
}
.redeem-submit--disabled {
opacity: 0.5;
}
.redeem-cancel-btn {
margin: 0 var(--space-page) 24px;
height: 48px;
border-radius: var(--radius-md);
background: transparent;
color: var(--color-heritage-red);
border: 1px solid var(--color-heritage-red);
display: flex;
align-items: center;
justify-content: center;
font-size: 15px;
font-weight: 600;
box-sizing: border-box;
}
.redeem-code-panel {
margin: 32px var(--space-page);
padding: 32px 20px;
@@ -76,20 +108,162 @@
text-align: center;
}
.redeem-code-value {
.redeem-code-head {
display: block;
font-family: var(--font-headline);
font-size: 36px;
font-weight: 700;
letter-spacing: 0.12em;
color: var(--color-heritage-red);
margin: 16px 0;
font-size: 14px;
color: var(--color-subtle-gray);
margin-bottom: 20px;
}
.redeem-code-timer {
.redeem-qr-wrap {
padding: 12px;
border: 4px solid rgba(166, 29, 36, 0.1);
border-radius: var(--radius-lg);
margin: 0 auto 20px;
width: 240px;
max-width: calc(100% - 40px);
box-sizing: border-box;
}
.redeem-qr-box {
position: relative;
width: 100%;
height: 0;
padding-bottom: 100%;
background: #fff;
overflow: hidden;
}
.redeem-qr-canvas {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
display: block;
font-size: 13px;
}
.redeem-qr-img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
display: block;
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center;
}
.redeem-qr-placeholder {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
background: var(--color-surface-container);
}
.redeem-qr-scanline {
position: absolute;
top: 0;
left: 0;
right: 0;
z-index: 3;
height: 3px;
background: linear-gradient(
180deg,
rgba(166, 29, 36, 0) 0%,
rgba(166, 29, 36, 0.85) 50%,
rgba(166, 29, 36, 0) 100%
);
box-shadow: 0 0 12px rgba(166, 29, 36, 0.55);
pointer-events: none;
animation: redeem-scan 3s ease-in-out infinite;
}
@keyframes redeem-scan {
0%,
100% {
top: 0;
opacity: 0.1;
}
50% {
top: 95%;
opacity: 0.8;
}
}
.redeem-timer {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 16px;
border-radius: var(--radius-md);
}
.redeem-timer--active {
animation: redeem-pulse 2s infinite;
}
@keyframes redeem-pulse {
0% {
box-shadow: 0 0 0 0 rgba(166, 29, 36, 0.2);
}
70% {
box-shadow: 0 0 0 10px rgba(166, 29, 36, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(166, 29, 36, 0);
}
}
.redeem-timer-value {
font-family: var(--font-headline);
font-size: 24px;
font-weight: 700;
color: var(--color-ink-black);
}
.redeem-timer-label {
font-size: 10px;
letter-spacing: 0.12em;
color: var(--color-subtle-gray);
margin-top: 4px;
}
.redeem-code-amount {
display: block;
font-family: var(--font-headline);
font-size: 28px;
font-weight: 700;
color: var(--color-heritage-red);
margin: 8px 0 16px;
}
.redeem-code-token-wrap {
margin-top: 8px;
padding-top: 16px;
border-top: 1px solid var(--color-surface-container);
}
.redeem-code-token-label {
display: block;
font-size: 12px;
color: var(--color-subtle-gray);
margin-bottom: 4px;
}
.redeem-code-token {
display: block;
font-family: ui-monospace, monospace;
font-size: 11px;
word-break: break-all;
color: var(--color-on-surface);
line-height: 1.5;
}
.redeem-success-icon {
@@ -119,7 +293,46 @@
text-align: center;
font-size: 14px;
color: var(--color-subtle-gray);
margin-bottom: 32px;
margin-bottom: 24px;
}
.redeem-success-amount {
display: block;
text-align: center;
font-family: var(--font-headline);
font-size: 28px;
font-weight: 700;
color: var(--color-heritage-red);
margin-bottom: 8px;
}
.redeem-success-details {
margin: 0 var(--space-page) 24px;
padding: 16px;
background: var(--color-card);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-card);
}
.redeem-success-detail-row {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 12px;
padding: 10px 0;
font-size: 13px;
border-bottom: 1px solid var(--color-surface-container);
}
.redeem-success-detail-row:last-child {
border-bottom: none;
}
.redeem-success-mono {
font-family: ui-monospace, monospace;
font-size: 12px;
text-align: right;
word-break: break-all;
}
.ledger-item {