feat: 收口多品牌与模板构建基础

This commit is contained in:
que01 committed 2026-09-25 02:55:46 +08:00
1 parent 0425a1c672
commit 77224ea51f
317 files changed
+11290 -1158

No files matched your search

@@ -0,0 +1,26 @@
const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace");
Page({
data: { brand: {}, presentation: {}, trustContent: [], offerings: [], error: "" },
onLoad() {
loadWorkspaceWithFallback()
.then((workspace) =>
this.setData({
brand: workspace.brand || {},
presentation: workspace.brand?.visualPresentation?.home || {},
trustContent: workspace.trustContent || [],
offerings: workspace.offerings || [],
}),
)
.catch((error) => this.setData({ error: error.message }));
},
selectOffering(event) {
wx.navigateTo({ url: "/pages/offering/detail?id=" + event.detail.id });
},
goWorks() {
wx.navigateTo({ url: "/pages/services/index" });
},
goInquiry() {
wx.navigateTo({ url: "/pages/inquiry/index" });
},
});
@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "阿成校园餐",
"usingComponents": {
"acheng-home": "/components/templates/acheng-home/acheng-home"
}
}
@@ -0,0 +1,4 @@
<view class="page">
<view wx:if="{{error}}" class="runtime-error">{{error}}</view>
<acheng-home wx:else brand="{{brand}}" presentation="{{presentation}}" trust-content="{{trustContent}}" offerings="{{offerings}}" bind:select="selectOffering" bind:inquiry="goInquiry" bind:offerings="goWorks" />
</view>
@@ -0,0 +1,11 @@
.page {
background: #fff8f0;
min-height: 100vh;
}
.runtime-error {
margin: 48rpx 32rpx;
padding: 28rpx;
color: #8a4b2a;
background: #fff;
border-radius: 16rpx;
}