feat: 收口多品牌与模板构建基础
This commit is contained in:
1 parent
0425a1c672
commit
77224ea51f
317 files changed
+11290
-1158
No files matched your search
@@ -1,11 +1,17 @@
|
||||
const { customerRequest } = require("../../utils/request");
|
||||
const { customerRequest, customerTokenKey } = require("../../utils/request");
|
||||
const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace");
|
||||
|
||||
Page({
|
||||
data: { record: {} },
|
||||
data: { record: {}, presentation: {} },
|
||||
onLoad(options) {
|
||||
loadWorkspaceWithFallback()
|
||||
.then((workspace) =>
|
||||
this.setData({ presentation: workspace.brand?.visualPresentation?.success || {} }),
|
||||
)
|
||||
.catch(() => {});
|
||||
const record = wx.getStorageSync("latestInquirySubmission") || {};
|
||||
if (record.id === options.id) this.setData({ record });
|
||||
if (options.id && wx.getStorageSync("customerToken")) {
|
||||
if (options.id && wx.getStorageSync(customerTokenKey())) {
|
||||
customerRequest("/customer/inquiry-submissions/" + encodeURIComponent(options.id))
|
||||
.then((submission) =>
|
||||
this.setData({
|
||||
@@ -25,6 +31,6 @@ Page({
|
||||
wx.redirectTo({ url: "/pages/records/index" });
|
||||
},
|
||||
home() {
|
||||
wx.switchTab({ url: "/pages/index/index" });
|
||||
wx.navigateTo({ url: "/pages/index/index" });
|
||||
},
|
||||
});
|
||||
@@ -1 +1 @@
|
||||
<success-summary record="{{record}}" bind:records="viewRecords" bind:home="home" />
|
||||
<success-summary record="{{record}}" presentation="{{presentation}}" bind:records="viewRecords" bind:home="home" />
|
||||
Reference in new issue
Block a user