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
+32
View File
@@ -0,0 +1,32 @@
const { apiBase } = require("./utils/config");
App({
globalData: {
apiBase,
token: "",
child: null,
},
onLaunch() {
this.globalData.token = wx.getStorageSync("ql_token") || "";
this.globalData.child = wx.getStorageSync("ql_child") || null;
},
setToken(token, guardian) {
this.globalData.token = token || "";
wx.setStorageSync("ql_token", this.globalData.token);
if (guardian) wx.setStorageSync("ql_guardian", guardian);
},
setChild(child) {
this.globalData.child = child || null;
wx.setStorageSync("ql_child", this.globalData.child);
},
clearAuth() {
this.globalData.token = "";
this.globalData.child = null;
wx.removeStorageSync("ql_token");
wx.removeStorageSync("ql_child");
},
});