refactor: 重构模板叠加式编译产物
This commit is contained in:
1 parent
c46297b13b
commit
25d1fe983c
93 files changed
+870
-2467
No files matched your search
@@ -0,0 +1,22 @@
|
||||
const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace");
|
||||
|
||||
Page({
|
||||
data: { brand: {}, presentation: {}, offerings: [], error: "" },
|
||||
onLoad() {
|
||||
loadWorkspaceWithFallback()
|
||||
.then((workspace) =>
|
||||
this.setData({
|
||||
brand: workspace.brand || {},
|
||||
presentation: workspace.brand?.visualPresentation?.offerings || {},
|
||||
offerings: workspace.offerings || [],
|
||||
}),
|
||||
)
|
||||
.catch((error) => this.setData({ error: error.message }));
|
||||
},
|
||||
open(event) {
|
||||
wx.navigateTo({ url: "/pages/offering/detail?id=" + event.detail.id });
|
||||
},
|
||||
inquire() {
|
||||
wx.navigateTo({ url: "/pages/inquiry/index" });
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"navigationBarTitleText": "案例与体系",
|
||||
"navigationBarBackgroundColor": "#FBF7F1",
|
||||
"navigationBarTextStyle": "black",
|
||||
"usingComponents": {
|
||||
"linjing-offerings": "/components/templates/linjing-offerings/linjing-offerings"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<view class="page">
|
||||
<view wx:if="{{error}}" class="runtime-error">{{error}}</view>
|
||||
<linjing-offerings wx:else brand="{{brand}}" presentation="{{presentation}}" offerings="{{offerings}}" bind:open="open" bind:more="inquire" />
|
||||
</view>
|
||||
@@ -0,0 +1 @@
|
||||
/* 页面样式由林境模板组件提供。 */
|
||||
Reference in new issue
Block a user