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
+28
View File
@@ -0,0 +1,28 @@
const api = require("../../utils/api");
Page({
data: { a: false, b: false, ok: false, loading: false },
onLoad() {
if (!api.requireLogin()) return;
},
toggle(e) {
const key = e.currentTarget.dataset.k;
const next = {};
next[key] = !this.data[key];
this.setData(next, () => this.setData({ ok: this.data.a && this.data.b }));
},
onOk() {
if (!this.data.ok || this.data.loading) return;
this.setData({ loading: true });
api
.post("/api/consent", { version: "v1" })
.then(() => wx.reLaunch({ url: "/pages/children/children" }))
.catch((e) => {
api.toastError(e);
this.setData({ loading: false });
});
},
});