18 lines
603 B
JavaScript
18 lines
603 B
JavaScript
const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace");
|
|
Page({
|
|
data: { brand: {}, templateKey: "", presentation: {}, navigation: [], loading: true },
|
|
onLoad() {
|
|
loadWorkspaceWithFallback()
|
|
.then((workspace) =>
|
|
this.setData({
|
|
brand: workspace.brand || {},
|
|
templateKey: workspace.visualTemplate?.key || "",
|
|
presentation: workspace.brand?.visualPresentation?.home || {},
|
|
navigation: workspace.navigation || [],
|
|
loading: false,
|
|
}),
|
|
)
|
|
.catch(() => this.setData({ loading: false }));
|
|
},
|
|
});
|