chore: 首次纳入版本控制(审查前基线,v1.2.0)

This commit is contained in:
errortopic
2026-11-18 20:13:37 +08:00
commit f7b28e1740
441 changed files with 31220 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
const api = require("../../utils/api");
Page({
data: {
numbers: null,
weakest: [],
oneLine: "",
printUrl: "",
loading: true,
},
onShow() {
if (!api.requireChild()) return;
this.load();
},
load() {
const child = getApp().globalData.child;
api
.get("/api/report/weekly?child_id=" + child.id)
.then((d) => {
this.setData({
numbers: d.numbers,
weakest: d.weakest || [],
oneLine: d.one_line || "",
printUrl:
getApp().globalData.apiBase +
"/api/print/weekly?child_id=" +
child.id +
"&token=" +
encodeURIComponent(api.token()),
loading: false,
});
})
.catch((e) => {
api.toastError(e);
this.setData({ loading: false });
});
},
onPrint() {
wx.navigateTo({ url: "/pages/print/print?url=" + encodeURIComponent(this.data.printUrl) });
},
});