功能:新增微信小程序界面

This commit is contained in:
xiaowang
2026-04-01 15:18:35 +08:00
parent bb2d8c4410
commit 7fa67d0511
92 changed files with 7463 additions and 0 deletions
@@ -0,0 +1,22 @@
Component({
properties: {
item: {
type: Object,
value: {}
},
showMeta: {
type: Boolean,
value: true
},
showStats: {
type: Boolean,
value: false
}
},
methods: {
handleTap() {
this.triggerEvent('select', this.properties.item)
}
}
})
@@ -0,0 +1,3 @@
{
"component": true
}
@@ -0,0 +1,21 @@
<view class="product-card" bindtap="handleTap">
<view class="product-cover-wrap">
<image class="product-cover" src="{{item.coverUrl}}" mode="aspectFill"></image>
<view class="product-cover-shadow"></view>
<view wx:if="{{showMeta && item.metaText}}" class="product-meta-badge">{{item.metaText}}</view>
</view>
<view class="product-body">
<view class="product-title">{{item.displayTitle}}</view>
<view wx:if="{{!showMeta && item.metaText}}" class="product-meta">{{item.metaText}}</view>
<view wx:if="{{item.tagsPreview && item.tagsPreview.length}}" class="product-tags">
<text wx:for="{{item.tagsPreview}}" wx:key="*this" class="tag-item">{{item}}</text>
</view>
<view class="product-footer">
<view class="product-price-wrap">
<text class="product-price">{{item.priceText}}</text>
<text wx:if="{{showStats}}" class="product-stats">{{item.statsText}}</text>
</view>
<view class="product-arrow">查看</view>
</view>
</view>
</view>
@@ -0,0 +1,119 @@
.product-card {
display: flex;
flex-direction: column;
overflow: hidden;
border-radius: 30rpx;
background: #ffffff;
border: 1rpx solid rgba(239, 216, 224, 0.84);
box-shadow: 0 18rpx 42rpx rgba(122, 67, 88, 0.08);
}
.product-cover-wrap {
position: relative;
}
.product-cover {
width: 100%;
height: 300rpx;
background: #f7ecf0;
}
.product-cover-shadow {
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 120rpx;
background: linear-gradient(180deg, rgba(28, 23, 26, 0), rgba(28, 23, 26, 0.28));
}
.product-meta-badge {
position: absolute;
left: 18rpx;
top: 18rpx;
max-width: calc(100% - 36rpx);
padding: 10rpx 16rpx;
border-radius: 999rpx;
background: rgba(255, 255, 255, 0.92);
color: #7a5262;
font-size: 20rpx;
font-weight: 700;
}
.product-body {
display: flex;
flex-direction: column;
gap: 12rpx;
padding: 22rpx 22rpx 24rpx;
}
.product-title {
font-size: 28rpx;
font-weight: 700;
line-height: 1.5;
color: #2d2430;
}
.product-meta {
font-size: 24rpx;
color: #8d7a84;
line-height: 1.5;
}
.product-tags {
display: flex;
flex-wrap: wrap;
gap: 10rpx;
}
.tag-item {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 8rpx 16rpx;
border-radius: 999rpx;
background: #fbecf1;
color: #c6597d;
font-size: 20rpx;
}
.product-footer {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 16rpx;
margin-top: 4rpx;
}
.product-price-wrap {
flex: 1;
min-width: 0;
}
.product-price {
display: block;
font-size: 30rpx;
font-weight: 700;
color: #d5536f;
}
.product-stats {
display: block;
margin-top: 8rpx;
font-size: 22rpx;
color: #9d8a92;
}
.product-arrow {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 96rpx;
height: 52rpx;
padding: 0 18rpx;
border-radius: 999rpx;
background: #fff1f5;
color: #c6597d;
font-size: 22rpx;
font-weight: 700;
}