chore: 统一小程序代码格式
This commit is contained in:
1 parent
11dc293349
commit
1a2f179e15
48 files changed
+1701
-66
No files matched your search
@@ -1,10 +1,18 @@
|
||||
const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace");
|
||||
Page({
|
||||
data: {
|
||||
brand: {}, trustContent: [], records: [],
|
||||
brand: {},
|
||||
trustContent: [],
|
||||
records: [],
|
||||
},
|
||||
onLoad() {
|
||||
loadWorkspaceWithFallback().then((workspace) => this.setData({ brand: workspace.brand || {}, trustContent: workspace.trustContent || [], records: wx.getStorageSync("linjingInquiryRecords") || [] }));
|
||||
loadWorkspaceWithFallback().then((workspace) =>
|
||||
this.setData({
|
||||
brand: workspace.brand || {},
|
||||
trustContent: workspace.trustContent || [],
|
||||
records: wx.getStorageSync("linjingInquiryRecords") || [],
|
||||
}),
|
||||
);
|
||||
},
|
||||
onShow() {
|
||||
this.setData({ records: wx.getStorageSync("linjingInquiryRecords") || [] });
|
||||
@@ -12,8 +20,15 @@ Page({
|
||||
call() {
|
||||
wx.makePhoneCall({ phoneNumber: (this.data.brand.contactPhone || "").replace(/[^0-9-]/g, "") });
|
||||
},
|
||||
copyWechat() { wx.setClipboardData({ data: this.data.brand.contactWechat || "", success: () => wx.showToast({ title: "微信号已复制", icon: "none" }) }); },
|
||||
recordsPage() { wx.navigateTo({ url: "/pages/records/index" }); },
|
||||
copyWechat() {
|
||||
wx.setClipboardData({
|
||||
data: this.data.brand.contactWechat || "",
|
||||
success: () => wx.showToast({ title: "微信号已复制", icon: "none" }),
|
||||
});
|
||||
},
|
||||
recordsPage() {
|
||||
wx.navigateTo({ url: "/pages/records/index" });
|
||||
},
|
||||
inquire() {
|
||||
wx.navigateTo({ url: "/pages/inquiry/index" });
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user