11 lines
999 B
JavaScript
11 lines
999 B
JavaScript
const { brand, trustContent, offerings } = require("../../utils/linjing-data");
|
|
const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace");
|
|
Page({
|
|
data: { brand, trustContent, offerings, modules: [], theme: {}, loading: false },
|
|
onLoad() { this.setData({ loading: true }); loadWorkspaceWithFallback().then((workspace) => { this.setData({ brand: workspace.brand, trustContent: workspace.trustContent || trustContent, offerings: workspace.offerings || offerings, modules: workspace.modules || [], theme: workspace.theme || {}, loading: false }); wx.setNavigationBarTitle({ title: workspace.brand.name || brand.name }); }); },
|
|
selectOffering(e) { const id = e.detail ? e.detail.id : e.currentTarget.dataset.id; wx.navigateTo({ url: "/pages/offering/detail?id=" + id }); },
|
|
goWorks() { wx.switchTab({ url: "/pages/services/index" }); },
|
|
goInquiry() { wx.navigateTo({ url: "/pages/inquiry/index" }); },
|
|
goProfile() { wx.switchTab({ url: "/pages/bookings/index" }); },
|
|
});
|