feat: 收口多品牌与模板构建基础
This commit is contained in:
1 parent
0425a1c672
commit
77224ea51f
317 files changed
+11290
-1158
No files matched your search
+43
@@ -0,0 +1,43 @@
|
||||
Component({
|
||||
properties: {
|
||||
brand: { type: Object, value: {} },
|
||||
presentation: { type: Object, value: {} },
|
||||
offerings: { type: Array, value: [] },
|
||||
},
|
||||
data: {
|
||||
activeCategory: "全部案例",
|
||||
categories: ["全部案例", "入户大门", "庭院围墙门", "室内户内门", "装饰隐形门"],
|
||||
visibleOfferings: [],
|
||||
},
|
||||
observers: {
|
||||
offerings(offerings) {
|
||||
this.filterOfferings(offerings, this.data.activeCategory);
|
||||
},
|
||||
},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
this.filterOfferings(this.data.offerings, this.data.activeCategory);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
filterOfferings(offerings, category) {
|
||||
const normalizedCategory = (item) =>
|
||||
item.category || item.presentation?.categoryLabel || item.presentation?.categoryKey || "";
|
||||
const visibleOfferings = (offerings || []).filter(
|
||||
(item) => category === "全部案例" || normalizedCategory(item) === category,
|
||||
);
|
||||
this.setData({ visibleOfferings });
|
||||
},
|
||||
chooseCategory(event) {
|
||||
const activeCategory = event.currentTarget.dataset.category;
|
||||
this.setData({ activeCategory });
|
||||
this.filterOfferings(this.data.offerings, activeCategory);
|
||||
},
|
||||
open(event) {
|
||||
this.triggerEvent("open", { id: event.currentTarget.dataset.id });
|
||||
},
|
||||
more() {
|
||||
this.triggerEvent("more");
|
||||
},
|
||||
},
|
||||
});
|
||||
+1
@@ -0,0 +1 @@
|
||||
{ "component": true }
|
||||
+1
@@ -0,0 +1 @@
|
||||
<view class="page linjing-works"><view class="works-intro"><text class="eyebrow">{{presentation.worksEyebrow || 'SELECTED WORKS'}}</text><text class="title">{{presentation.worksTitle || '案例与体系'}}</text><text class="subtitle">{{presentation.subtitle || '从建筑入口到室内秩序,呈现每一扇门的完整构造。'}}</text></view><view class="category-line"><text wx:for="{{categories}}" wx:key="*this" class="category-tab {{activeCategory === item ? 'active' : ''}}" data-category="{{item}}" bindtap="chooseCategory">{{item}}</text></view><view wx:if="{{!visibleOfferings.length}}" class="empty">暂无该类别案例</view><view class="works-list"><view wx:for="{{visibleOfferings}}" wx:key="id" class="work" data-id="{{item.id}}" bindtap="open"><image src="{{item.image || item.coverUrl}}" mode="aspectFill"/><view class="work-copy"><text class="category">{{item.category || item.presentation.categoryLabel}}</text><text class="name">{{item.name}}</text><text class="series">{{item.series || item.summary}}</text><view class="meta"><text>{{item.area || 'PRIVATE RESIDENCE'}}</text><text>查看项目 →</text></view></view></view></view><view class="closing"><text>每一套门系统,都是建筑秩序的一部分。</text><text class="more" bindtap="more">预约一次私宅门系统沟通 →</text></view></view>
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
padding: 56rpx 36rpx 150rpx;
|
||||
background: #202221;
|
||||
color: #f4f0e8;
|
||||
}
|
||||
.works-intro {
|
||||
padding: 12rpx 4rpx 42rpx;
|
||||
}
|
||||
.eyebrow {
|
||||
display: block;
|
||||
color: #c5ad8b;
|
||||
font-size: 18rpx;
|
||||
letter-spacing: 4rpx;
|
||||
}
|
||||
.title {
|
||||
display: block;
|
||||
margin-top: 18rpx;
|
||||
font-family: serif;
|
||||
font-size: 56rpx;
|
||||
line-height: 1.15;
|
||||
}
|
||||
.subtitle {
|
||||
display: block;
|
||||
max-width: 620rpx;
|
||||
margin-top: 18rpx;
|
||||
color: #bcb8b0;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.7;
|
||||
}
|
||||
.category-line {
|
||||
display: flex;
|
||||
gap: 22rpx;
|
||||
overflow: hidden;
|
||||
padding: 18rpx 0;
|
||||
border-top: 1rpx solid #444641;
|
||||
border-bottom: 1rpx solid #444641;
|
||||
color: #aaa69d;
|
||||
font-size: 19rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.category-tab {
|
||||
flex: none;
|
||||
padding-bottom: 8rpx;
|
||||
}
|
||||
.category-tab.active {
|
||||
color: #e8d9c2;
|
||||
border-bottom: 2rpx solid #c5ad8b;
|
||||
}
|
||||
.empty {
|
||||
padding: 60rpx 0;
|
||||
color: #aaa69d;
|
||||
font-size: 22rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.works-list {
|
||||
margin-top: 28rpx;
|
||||
}
|
||||
.work {
|
||||
overflow: hidden;
|
||||
margin-bottom: 24rpx;
|
||||
border: 1rpx solid #444641;
|
||||
background: #292b29;
|
||||
}
|
||||
.work image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 360rpx;
|
||||
filter: saturate(0.75);
|
||||
}
|
||||
.work-copy {
|
||||
padding: 22rpx 24rpx 24rpx;
|
||||
}
|
||||
.category {
|
||||
display: block;
|
||||
color: #bba585;
|
||||
font-size: 18rpx;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
.name {
|
||||
display: block;
|
||||
margin-top: 10rpx;
|
||||
color: #f3eee5;
|
||||
font-family: serif;
|
||||
font-size: 30rpx;
|
||||
line-height: 1.35;
|
||||
}
|
||||
.series {
|
||||
display: block;
|
||||
margin-top: 9rpx;
|
||||
color: #aaa69d;
|
||||
font-size: 20rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.meta {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 20rpx;
|
||||
color: #888b84;
|
||||
font-size: 17rpx;
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
.meta text:last-child {
|
||||
color: #d5c09c;
|
||||
}
|
||||
.closing {
|
||||
padding: 38rpx 4rpx;
|
||||
color: #aaa69d;
|
||||
font-size: 21rpx;
|
||||
line-height: 1.7;
|
||||
}
|
||||
.closing .more {
|
||||
display: block;
|
||||
margin-top: 22rpx;
|
||||
color: #d5c09c;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
Reference in new issue
Block a user