feat: 收口多品牌与模板构建基础
This commit is contained in:
1 parent
0425a1c672
commit
77224ea51f
317 files changed
+11290
-1158
No files matched your search
+22
@@ -0,0 +1,22 @@
|
||||
Component({
|
||||
properties: {
|
||||
brand: { type: Object, value: {} },
|
||||
presentation: { type: Object, value: {} },
|
||||
trustContent: { type: Object, value: {} },
|
||||
offerings: { type: Array, value: [] },
|
||||
},
|
||||
methods: {
|
||||
openOffering(e) {
|
||||
this.triggerEvent("select", { id: e.currentTarget.dataset.id });
|
||||
},
|
||||
openInquiry() {
|
||||
this.triggerEvent("inquiry");
|
||||
},
|
||||
openOfferings() {
|
||||
this.triggerEvent("offerings");
|
||||
},
|
||||
openService() {
|
||||
wx.navigateTo({ url: "/pages/stall-service/index" });
|
||||
},
|
||||
},
|
||||
});
|
||||
+1
@@ -0,0 +1 @@
|
||||
{ "component": true }
|
||||
+1
@@ -0,0 +1 @@
|
||||
<view class="page"><view class="brand-card"><view class="identity"><image src="{{brand.avatarUrl}}" mode="aspectFill"/><view><text class="name">{{brand.founder}}</text><text class="title">{{brand.title}}</text><text class="slogan">“{{brand.slogan}}”</text></view></view><view class="notice"><text class="notice-title">{{presentation.stallTitle || '今日出摊点'}}</text><text>{{brand.studioAddress || brand.address}}</text><text class="notice-time">{{presentation.stallTime || '17:00 - 22:30 · 今日营业中'}}</text><text class="notice-desc">晚高峰人多,可提前预约,下课直取不排队。</text></view><view class="actions"><button bindtap="openInquiry">预约 / 定制</button><button class="muted" bindtap="openOfferings">今日菜单</button></view></view><view class="scene-wrap"><view class="section-head"><text class="eyebrow">真实出摊现场</text><text class="more">大学城老校门夜市实拍</text></view><image class="scene" src="{{brand.heroImage}}" mode="aspectFill" bindtap="openService"/></view><view class="section-head"><view><text class="eyebrow">{{presentation.worksEyebrow || '本周学生票选招牌'}}</text><text class="heading">{{presentation.worksTitle || '现做现吃,认真管饱'}}</text><text class="subline">米饭免费续,附赠当日老汤或绿豆沙</text></view><text class="more" bindtap="openOfferings">全部餐品 ›</text></view><view class="dish-grid"><view wx:for="{{offerings}}" wx:key="id" class="dish" data-id="{{item.id}}" bindtap="openOffering"><image src="{{item.image}}" mode="aspectFill"/><view class="dish-copy"><text class="dish-name">{{item.name}}</text><text class="dish-sub">{{item.desc}}</text><text class="price">{{item.priceRange}}</text></view></view></view><view class="promise"><text class="eyebrow light">{{presentation.manifestoEyebrow || '阿成的四大开档底线'}}</text><text class="promise-title">{{presentation.manifestoTitle || '真材实料,当天现做'}}</text><view class="promise-grid"><text>✓ 当天采购</text><text>✓ 现炒锅气</text><text>✓ 免费续饭</text><text>✓ 不用料理包</text></view><view class="quote">“上周街舞社订了 35 份,按寝室分组打包,送来还烫嘴!”<text>—— 街舞社负责人</text></view></view></view>
|
||||
+225
@@ -0,0 +1,225 @@
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
padding: 20rpx 28rpx 48rpx;
|
||||
background: #fff8f0;
|
||||
color: #29231f;
|
||||
}
|
||||
.brand-card {
|
||||
padding: 28rpx;
|
||||
border: 1rpx solid #f2d9c6;
|
||||
border-radius: 28rpx;
|
||||
background: #fff;
|
||||
box-shadow: 0 12rpx 30rpx rgba(145, 75, 33, 0.08);
|
||||
}
|
||||
.identity {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.identity image {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border: 4rpx solid #ffd9bb;
|
||||
border-radius: 50%;
|
||||
background: #fff1e5;
|
||||
}
|
||||
.name,
|
||||
.title,
|
||||
.slogan,
|
||||
.notice-title,
|
||||
.notice text,
|
||||
.eyebrow,
|
||||
.heading,
|
||||
.more,
|
||||
.dish-name,
|
||||
.dish-sub,
|
||||
.price,
|
||||
.promise-title,
|
||||
.promise-item text {
|
||||
display: block;
|
||||
}
|
||||
.name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.title {
|
||||
margin-top: 6rpx;
|
||||
color: #a2613b;
|
||||
font-size: 21rpx;
|
||||
}
|
||||
.slogan {
|
||||
margin-top: 10rpx;
|
||||
color: #7a6a60;
|
||||
font-size: 21rpx;
|
||||
}
|
||||
.notice {
|
||||
position: relative;
|
||||
margin-top: 24rpx;
|
||||
padding: 20rpx;
|
||||
border: 1rpx solid #f8d7b4;
|
||||
border-radius: 20rpx;
|
||||
background: #fff7df;
|
||||
color: #6b4a35;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.notice-title {
|
||||
font-weight: 700;
|
||||
color: #4f3020;
|
||||
}
|
||||
.notice-time {
|
||||
position: absolute;
|
||||
right: 18rpx;
|
||||
top: 18rpx;
|
||||
color: #c65c28;
|
||||
font-size: 19rpx;
|
||||
}
|
||||
.notice-desc {
|
||||
display: block;
|
||||
margin-top: 8rpx;
|
||||
color: #8c7b70;
|
||||
font-size: 19rpx;
|
||||
}
|
||||
.scene-wrap {
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
.scene {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 270rpx;
|
||||
border-radius: 22rpx;
|
||||
}
|
||||
.subline {
|
||||
display: block;
|
||||
margin-top: 6rpx;
|
||||
color: #8c7b70;
|
||||
font-size: 19rpx;
|
||||
}
|
||||
.promise-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 10rpx;
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
.promise-grid text {
|
||||
padding: 12rpx;
|
||||
border-radius: 12rpx;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
color: #ffe5d2;
|
||||
font-size: 19rpx;
|
||||
}
|
||||
.quote {
|
||||
margin-top: 18rpx;
|
||||
padding-top: 16rpx;
|
||||
border-top: 1rpx solid rgba(255, 255, 255, 0.15);
|
||||
color: #ffe5d2;
|
||||
font-size: 20rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.quote text {
|
||||
display: block;
|
||||
margin-top: 8rpx;
|
||||
color: #ffc79f;
|
||||
font-size: 18rpx;
|
||||
}
|
||||
.actions {
|
||||
display: flex;
|
||||
gap: 14rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.actions button {
|
||||
flex: 1;
|
||||
height: 76rpx;
|
||||
border-radius: 20rpx;
|
||||
background: #e87532;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
line-height: 76rpx;
|
||||
}
|
||||
.actions .muted {
|
||||
background: #fff0e5;
|
||||
color: #b85e2c;
|
||||
}
|
||||
.section-head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: end;
|
||||
margin: 34rpx 4rpx 18rpx;
|
||||
}
|
||||
.eyebrow {
|
||||
color: #d2652b;
|
||||
font-size: 19rpx;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
.heading {
|
||||
margin-top: 8rpx;
|
||||
font-size: 34rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.more {
|
||||
color: #d2652b;
|
||||
font-size: 21rpx;
|
||||
}
|
||||
.dish-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 16rpx;
|
||||
}
|
||||
.dish {
|
||||
overflow: hidden;
|
||||
border: 1rpx solid #f2e2d6;
|
||||
border-radius: 22rpx;
|
||||
background: #fff;
|
||||
}
|
||||
.dish image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 220rpx;
|
||||
background: #f3e7de;
|
||||
}
|
||||
.dish-copy {
|
||||
padding: 18rpx;
|
||||
}
|
||||
.dish-name {
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.dish-sub {
|
||||
margin-top: 6rpx;
|
||||
color: #8c7b70;
|
||||
font-size: 19rpx;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.price {
|
||||
margin-top: 14rpx;
|
||||
color: #dc6429;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.promise {
|
||||
margin-top: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 24rpx;
|
||||
background: #3b2118;
|
||||
color: #fff;
|
||||
}
|
||||
.light {
|
||||
color: #ffc79f;
|
||||
}
|
||||
.promise-title {
|
||||
margin-top: 8rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.promise-item {
|
||||
display: flex;
|
||||
gap: 12rpx;
|
||||
margin-top: 18rpx;
|
||||
color: #ffe5d2;
|
||||
font-size: 21rpx;
|
||||
}
|
||||
.promise-item text:first-child {
|
||||
color: #ff9a5a;
|
||||
font-weight: 700;
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
Component({
|
||||
properties: {
|
||||
brand: { type: Object, value: {} },
|
||||
presentation: { type: Object, value: {} },
|
||||
offerings: { type: Array, value: [] },
|
||||
},
|
||||
data: { query: "", visibleOfferings: [] },
|
||||
observers: {
|
||||
"offerings, query"(offerings, query) {
|
||||
const keyword = String(query || "")
|
||||
.trim()
|
||||
.toLowerCase();
|
||||
this.setData({
|
||||
visibleOfferings: (offerings || []).filter((item) => {
|
||||
if (!keyword) return true;
|
||||
return [item.name, item.desc, ...(item.keywords || [])].some((value) =>
|
||||
String(value || "")
|
||||
.toLowerCase()
|
||||
.includes(keyword),
|
||||
);
|
||||
}),
|
||||
});
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
search(e) {
|
||||
this.setData({ query: e.detail.value });
|
||||
},
|
||||
open(e) {
|
||||
this.triggerEvent("open", { id: e.currentTarget.dataset.id });
|
||||
},
|
||||
inquire() {
|
||||
this.triggerEvent("inquire");
|
||||
},
|
||||
},
|
||||
});
|
||||
+1
@@ -0,0 +1 @@
|
||||
{ "component": true }
|
||||
+1
@@ -0,0 +1 @@
|
||||
<view class="page"><view class="head"><text class="eyebrow">{{brand.name}}</text><text class="title">{{presentation.title || '今日菜单'}}</text><text class="subtitle">{{presentation.subtitle || '现做现吃,支持提前预留和团体定制'}}</text></view><view class="filters"><view class="filter active">全部餐品</view><view class="filter">日常学生餐</view><view class="filter">寝室 / 团体</view><view class="filter">聚会定制</view></view><view class="search"><text class="search-icon">⌕</text><input value="{{query}}" placeholder="搜索餐品、牛肉、卤肉、鸡腿" bindinput="search" /></view><view class="tip">米饭免费续,支持微辣、免葱姜蒜,团体餐可提前预留。</view><view class="list"><view wx:for="{{visibleOfferings}}" wx:key="id" class="dish" data-id="{{item.id}}" bindtap="open"><view class="dish-media"><image src="{{item.image}}" mode="aspectFill"/><text class="tag">{{item.category || '现做餐品'}}</text></view><view class="copy"><text class="name">{{item.name}}</text><text class="desc">{{item.desc}}</text><view class="chips"><text>现做</text><text>今日有售</text></view><view class="bottom"><text class="price">{{item.priceRange}}</text><text class="action">详情 / 预留 ›</text></view></view></view></view><button class="cta" bindtap="inquire">团体活动 / 定制餐咨询</button></view>
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
padding: 28rpx;
|
||||
background: #fff8f0;
|
||||
color: #29231f;
|
||||
}
|
||||
.eyebrow {
|
||||
display: block;
|
||||
color: #d2652b;
|
||||
font-size: 19rpx;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
.title {
|
||||
display: block;
|
||||
margin-top: 8rpx;
|
||||
font-size: 42rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.subtitle {
|
||||
display: block;
|
||||
margin-top: 8rpx;
|
||||
color: #8c7b70;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.tip {
|
||||
margin-top: 22rpx;
|
||||
padding: 18rpx 20rpx;
|
||||
border: 1rpx solid #f8d7b4;
|
||||
border-radius: 18rpx;
|
||||
background: #fff7df;
|
||||
color: #8c5c39;
|
||||
font-size: 21rpx;
|
||||
}
|
||||
.filters {
|
||||
display: flex;
|
||||
gap: 10rpx;
|
||||
overflow: hidden;
|
||||
margin-top: 20rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.filter {
|
||||
padding: 10rpx 18rpx;
|
||||
border-radius: 999rpx;
|
||||
background: #f2eee9;
|
||||
color: #7a6a60;
|
||||
font-size: 21rpx;
|
||||
}
|
||||
.filter.active {
|
||||
background: #e87532;
|
||||
color: #fff;
|
||||
}
|
||||
.search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
margin-top: 16rpx;
|
||||
padding: 0 20rpx;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid #eee1d6;
|
||||
border-radius: 20rpx;
|
||||
background: #fff;
|
||||
}
|
||||
.search-icon {
|
||||
color: #d2652b;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
.search input {
|
||||
flex: 1;
|
||||
font-size: 23rpx;
|
||||
}
|
||||
.dish-media {
|
||||
position: relative;
|
||||
flex: none;
|
||||
}
|
||||
.dish-media .tag {
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
left: 10rpx;
|
||||
padding: 6rpx 10rpx;
|
||||
border-radius: 10rpx;
|
||||
background: rgba(59, 33, 24, 0.78);
|
||||
color: #fff;
|
||||
font-size: 18rpx;
|
||||
}
|
||||
.chips {
|
||||
display: flex;
|
||||
gap: 8rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.chips text {
|
||||
padding: 4rpx 8rpx;
|
||||
border-radius: 8rpx;
|
||||
background: #fff1e6;
|
||||
color: #c65c28;
|
||||
font-size: 17rpx;
|
||||
}
|
||||
.list {
|
||||
margin-top: 18rpx;
|
||||
}
|
||||
.dish {
|
||||
display: flex;
|
||||
gap: 18rpx;
|
||||
margin-bottom: 16rpx;
|
||||
padding: 14rpx;
|
||||
border: 1rpx solid #f2e2d6;
|
||||
border-radius: 22rpx;
|
||||
background: #fff;
|
||||
}
|
||||
.dish image,
|
||||
.dish-media image {
|
||||
width: 196rpx;
|
||||
height: 196rpx;
|
||||
flex: none;
|
||||
border-radius: 16rpx;
|
||||
background: #f3e7de;
|
||||
}
|
||||
.copy {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
}
|
||||
.name {
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
line-height: 1.45;
|
||||
}
|
||||
.desc {
|
||||
margin-top: 10rpx;
|
||||
color: #8c7b70;
|
||||
font-size: 20rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.bottom {
|
||||
display: flex;
|
||||
align-items: end;
|
||||
justify-content: space-between;
|
||||
margin-top: auto;
|
||||
}
|
||||
.price {
|
||||
color: #dc6429;
|
||||
font-size: 25rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.action {
|
||||
color: #d2652b;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
.cta {
|
||||
margin: 22rpx 0 0;
|
||||
height: 76rpx;
|
||||
border-radius: 20rpx;
|
||||
background: #e87532;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
line-height: 76rpx;
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
Component({
|
||||
properties: {
|
||||
brand: { type: Object, value: {} },
|
||||
presentation: { type: Object, value: {} },
|
||||
recordsCount: { type: Number, value: 0 },
|
||||
},
|
||||
methods: {
|
||||
call() {
|
||||
this.triggerEvent("call");
|
||||
},
|
||||
copy() {
|
||||
this.triggerEvent("copy");
|
||||
},
|
||||
records() {
|
||||
this.triggerEvent("records");
|
||||
},
|
||||
},
|
||||
});
|
||||
+1
@@ -0,0 +1 @@
|
||||
{ "component": true }
|
||||
+1
@@ -0,0 +1 @@
|
||||
<view class="page"><view class="profile-card"><image src="{{brand.avatarUrl}}" mode="aspectFill"/><text class="name">{{brand.founder}}</text><text class="title">{{brand.title}}</text><text class="bio">{{brand.slogan}}</text><view class="contact"><button bindtap="call">电话联系</button><button bindtap="copy">复制微信</button></view></view><view class="card"><text class="card-title">{{presentation.coverageTitle || '出摊与配送'}}</text><text>{{brand.studioAddress || brand.address}}</text><text>{{presentation.coverageContent || '支持校园摊位自取、宿舍配送和班级活动定制。'}}</text></view><view class="card" bindtap="records"><text class="card-title">我的预约记录</text><text>{{recordsCount}} 条记录 ›</text></view></view>
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
padding: 28rpx;
|
||||
background: #fff8f0;
|
||||
color: #29231f;
|
||||
}
|
||||
.profile-card {
|
||||
padding: 36rpx 28rpx;
|
||||
text-align: center;
|
||||
border-radius: 28rpx;
|
||||
background: #3b2118;
|
||||
color: #fff;
|
||||
}
|
||||
.profile-card image {
|
||||
width: 132rpx;
|
||||
height: 132rpx;
|
||||
border: 5rpx solid #ffbd8e;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.name,
|
||||
.title,
|
||||
.bio,
|
||||
.card-title,
|
||||
.card text {
|
||||
display: block;
|
||||
}
|
||||
.name {
|
||||
margin-top: 18rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.title {
|
||||
margin-top: 6rpx;
|
||||
color: #ffc79f;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.bio {
|
||||
margin-top: 16rpx;
|
||||
color: #ffe5d2;
|
||||
font-size: 23rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.contact {
|
||||
display: flex;
|
||||
gap: 14rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
.contact button {
|
||||
flex: 1;
|
||||
height: 70rpx;
|
||||
border-radius: 18rpx;
|
||||
background: #e87532;
|
||||
color: #fff;
|
||||
font-size: 22rpx;
|
||||
line-height: 70rpx;
|
||||
}
|
||||
.card {
|
||||
margin-top: 18rpx;
|
||||
padding: 26rpx;
|
||||
border: 1rpx solid #f2d9c6;
|
||||
border-radius: 22rpx;
|
||||
background: #fff;
|
||||
color: #7a6a60;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.7;
|
||||
}
|
||||
.card-title {
|
||||
margin-bottom: 10rpx;
|
||||
color: #4b2b1d;
|
||||
font-size: 27rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
Reference in new issue
Block a user