微信小程序上传

This commit is contained in:
2026-07-12 14:45:57 +08:00
parent d271ac5b13
commit becf91da52
45 changed files with 1815 additions and 23 deletions
+217
View File
@@ -0,0 +1,217 @@
/* Tab 主页面顶栏 + 首页(对齐 h5-user) */
.tab-main-header {
position: sticky;
top: 0;
z-index: 50;
display: flex;
align-items: center;
justify-content: center;
height: 56px;
padding: env(safe-area-inset-top, 0px) var(--space-page) 0;
padding-top: calc(env(safe-area-inset-top, 0px));
min-height: calc(56px + env(safe-area-inset-top, 0px));
background: var(--color-background);
box-shadow: var(--shadow-card);
box-sizing: border-box;
}
.tab-main-header__title {
font-family: var(--font-headline);
font-size: 18px;
font-weight: 700;
color: var(--color-heritage-red);
line-height: 56px;
}
.tab-main-header__extra {
position: absolute;
right: var(--space-page);
top: calc(env(safe-area-inset-top, 0px) + 28px);
transform: translateY(-50%);
display: flex;
align-items: center;
gap: 4px;
color: var(--color-heritage-red);
font-size: 12px;
font-weight: 500;
max-width: 46vw;
}
.tab-main-city-pin {
width: 14px;
height: 14px;
border-radius: 50%;
background: var(--color-heritage-red);
flex-shrink: 0;
position: relative;
}
.tab-main-city-pin::after {
content: '';
position: absolute;
left: 50%;
top: 50%;
width: 5px;
height: 5px;
margin: -2px 0 0 -2px;
border-radius: 50%;
background: #fff;
}
.tab-main-city-label {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 100px;
}
.home-page {
background: var(--color-background);
}
.home-aroma-nav {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 8px var(--space-page);
background: rgba(250, 249, 247, 0.95);
border-bottom: 1px solid var(--color-surface-container);
position: sticky;
top: calc(56px + env(safe-area-inset-top, 0px));
z-index: 40;
}
.home-aroma-tab {
border: none;
background: transparent;
padding: 6px 12px;
font-family: var(--font-headline);
font-size: 16px;
font-weight: 600;
line-height: 24px;
color: var(--color-subtle-gray);
border-bottom: 2px solid transparent;
white-space: nowrap;
}
.home-aroma-tab--active {
color: var(--color-heritage-red);
border-bottom-color: var(--color-heritage-red);
}
.home-aroma-tab--muted {
opacity: 0.65;
}
.home-product-list {
display: flex;
flex-direction: column;
gap: 16px;
padding: 16px var(--space-page);
}
.home-product-card {
background: var(--color-card);
border-radius: var(--radius-lg);
overflow: hidden;
box-shadow: var(--shadow-card);
}
.home-product-cover {
width: 100%;
height: 200px;
background: var(--color-surface-container);
display: block;
}
.home-product-cover--empty {
height: 200px;
background: var(--color-surface-container);
}
.home-product-body {
padding: var(--space-gutter);
display: flex;
flex-direction: column;
gap: 4px;
}
.home-product-row {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 8px;
}
.home-product-name {
font-family: var(--font-headline);
font-size: 16px;
font-weight: 600;
line-height: 24px;
color: var(--color-on-surface);
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.home-product-price {
font-size: 16px;
font-weight: 700;
color: var(--color-heritage-red);
flex-shrink: 0;
}
.home-product-sub {
font-size: 13px;
color: var(--color-subtle-gray);
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.home-product-footer {
margin-top: 4px;
}
.home-product-actions {
padding: 0 var(--space-gutter) var(--space-gutter);
display: flex;
justify-content: flex-end;
}
.home-buy-btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 8px 16px;
border-radius: var(--radius-full);
background: var(--color-heritage-red);
color: #fff;
font-size: 13px;
font-weight: 600;
border: none;
}
.home-empty {
text-align: center;
padding: 48px 24px;
color: var(--color-subtle-gray);
font-size: 14px;
}
.coupon-badge {
position: relative;
display: inline-flex;
align-items: center;
background: var(--color-aged-amber);
color: var(--color-on-secondary-container);
padding: 4px 12px;
border-radius: 2px;
font-family: var(--font-label);
font-size: 12px;
font-weight: 700;
letter-spacing: 0.05em;
}
+51
View File
@@ -0,0 +1,51 @@
/* Dukang design tokens — mirrored from packages/shared-ui/src/tokens.css */
page,
:root {
--color-surface: #faf9f7;
--color-surface-dim: #dadad8;
--color-surface-container-low: #f4f3f1;
--color-surface-container: #efeeec;
--color-surface-container-highest: #e3e2e0;
--color-on-surface: #1a1c1b;
--color-on-surface-variant: #5a413f;
--color-outline: #8d706e;
--color-outline-variant: #e2bebc;
--color-primary: #820012;
--color-on-primary: #ffffff;
--color-heritage-red: #a61d24;
--color-on-primary-container: #ffb9b4;
--color-secondary: #735c00;
--color-secondary-container: #fed65b;
--color-on-secondary-container: #745c00;
--color-aged-amber: #ffbf00;
--color-success-green: #2d6a4f;
--color-status-blue: #2a6ebb;
--color-subtle-gray: #999999;
--color-ink-black: #1a1a1a;
--color-error: #ba1a1a;
--color-background: #faf9f7;
--color-card: #ffffff;
--font-headline: 'PingFang SC', 'Noto Sans SC', sans-serif;
--font-body: 'PingFang SC', 'Noto Sans SC', sans-serif;
--font-label: 'PingFang SC', 'Noto Sans SC', sans-serif;
--radius-sm: 0.25rem;
--radius-md: 0.75rem;
--radius-lg: 1rem;
--radius-xl: 1.5rem;
--radius-full: 9999px;
--space-page: 20px;
--space-gutter: 12px;
--space-md: 16px;
--space-lg: 32px;
--shadow-card: 0 4px 20px rgba(166, 29, 36, 0.05);
--shadow-tabbar: 0 -4px 20px rgba(0, 0, 0, 0.06);
--border-card: 1px solid rgba(166, 29, 36, 0.05);
}