feat: add miniapp reference assets and primitives

This commit is contained in:
Codex
2026-09-14 06:38:44 +08:00
parent 311f251609
commit df47543501
37 changed files with 215 additions and 50 deletions
+10
View File
@@ -0,0 +1,10 @@
Component({
options: { addGlobalClass: true },
properties: {
eyebrow: { type: String, value: '' },
title: { type: String, value: '' },
subtitle: { type: String, value: '' },
imageSrc: { type: String, value: '' },
tone: { type: String, value: 'rose' },
},
})
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1,9 @@
<view class="service-hero service-hero--{{tone}}">
<image class="service-hero__image" src="{{imageSrc}}" mode="aspectFill" />
<view class="service-hero__veil"></view>
<view class="service-hero__content">
<text wx:if="{{eyebrow}}" class="service-hero__eyebrow">{{eyebrow}}</text>
<text class="service-hero__title">{{title}}</text>
<text wx:if="{{subtitle}}" class="service-hero__subtitle">{{subtitle}}</text>
</view>
</view>
@@ -0,0 +1,63 @@
.service-hero {
position: relative;
height: 300rpx;
overflow: hidden;
border-radius: 0 0 32rpx 32rpx;
background: #fff4f7;
}
.service-hero__image,
.service-hero__veil {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
.service-hero__veil {
background: linear-gradient(90deg, rgba(255, 250, 252, 0.98) 0%, rgba(255, 250, 252, 0.82) 38%, rgba(255, 250, 252, 0.08) 70%);
}
.service-hero--night .service-hero__veil {
background: linear-gradient(90deg, rgba(18, 24, 83, 0.92) 0%, rgba(34, 31, 111, 0.64) 42%, rgba(34, 31, 111, 0.08) 72%);
}
.service-hero__content {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
justify-content: center;
width: 54%;
height: 100%;
padding: 0 36rpx;
box-sizing: border-box;
}
.service-hero__eyebrow {
margin-bottom: 10rpx;
color: var(--color-primary);
font-size: 22rpx;
font-weight: 600;
letter-spacing: 2rpx;
}
.service-hero__title {
color: #24305e;
font-size: 40rpx;
font-weight: 700;
line-height: 1.28;
}
.service-hero__subtitle {
margin-top: 14rpx;
color: #737c96;
font-size: 24rpx;
line-height: 1.55;
}
.service-hero--night .service-hero__eyebrow,
.service-hero--night .service-hero__title,
.service-hero--night .service-hero__subtitle {
color: #ffffff;
}