12345678910111213141516171819202122 |
- //app.js
- import * as httpUtil from "./utils/httpUtil";
- App({
- onLaunch: async function () {
- // 展示本地存储能力
- var logs = wx.getStorageSync("logs") || [];
- logs.unshift(Date.now());
- wx.setStorageSync("logs", logs);
- },
- globalData: {
- userInfo: null,
- },
- ...httpUtil,
- getData: (event) => {
- const { target } = event;
- if (!target) return;
- const { dataset } = target;
- if (!dataset) return;
- return dataset;
- },
- tenant: "test",
- });
|