feat: 收口多品牌与模板构建基础
This commit is contained in:
1 parent
0425a1c672
commit
77224ea51f
317 files changed
+11290
-1158
No files matched your search
@@ -1,4 +1,5 @@
|
||||
const { customerRequest } = require("../../utils/request");
|
||||
const { customerRequest, customerTokenKey } = require("../../utils/request");
|
||||
const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace");
|
||||
|
||||
const statusLabels = {
|
||||
new: "待处理",
|
||||
@@ -10,9 +11,16 @@ const statusLabels = {
|
||||
};
|
||||
|
||||
Page({
|
||||
data: { records: [], loading: false },
|
||||
data: { records: [], loading: false, presentation: {} },
|
||||
onLoad() {
|
||||
loadWorkspaceWithFallback()
|
||||
.then((workspace) =>
|
||||
this.setData({ presentation: workspace.brand?.visualPresentation?.records || {} }),
|
||||
)
|
||||
.catch(() => {});
|
||||
},
|
||||
onShow() {
|
||||
if (!wx.getStorageSync("customerToken")) return this.setData({ records: [] });
|
||||
if (!wx.getStorageSync(customerTokenKey())) return this.setData({ records: [] });
|
||||
this.setData({ loading: true });
|
||||
customerRequest("/customer/inquiry-submissions")
|
||||
.then((items) =>
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="page"><view class="head"><text class="title">我的咨询记录</text><button bindtap="inquire">+ 新增预约</button></view><records-module records="{{records}}" bind:create="inquire" /></view>
|
||||
<view class="page"><view class="head"><text class="title">{{presentation.title}}</text><button bindtap="inquire">{{presentation.createAction}}</button></view><records-module records="{{records}}" presentation="{{presentation}}" bind:create="inquire" /></view>
|
||||
Reference in new issue
Block a user