"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const common_vendor = require("./common/vendor.js");
const api_user = require("./api/user.js");
const store_index = require("./store/index.js");
if (!Math) {
  "./pages/index/index.js";
  "./pages/my/index.js";
  "./pages/xuncha/mp_excelRcXcdjl_edit.js";
  "./pages/kqjl/kqjl_bzrDm_list.js";
  "./pages/kqjl/kqjl_bzrDm.js";
  "./pages/xfjl/index.js";
  "./pages/parent/in-out.js";
  "./pages/parent/message.js";
}
const _sfc_main = {
  onLaunch: function() {
    if (!common_vendor.index.getStorageSync("deviceInfo")) {
      const deviceInfo = common_vendor.index.getDeviceInfo();
      common_vendor.index.setStorageSync("deviceInfo", deviceInfo);
      common_vendor.index.__f__("log", "at App.vue:10", "初始化设备信息", deviceInfo);
    }
  },
  onShow: async function() {
    const userInfo = common_vendor.index.getStorageSync("userInfo");
    if (userInfo == null ? void 0 : userInfo.yhsbToken) {
      try {
        common_vendor.index.__f__("log", "at App.vue:18", "自动登录", userInfo.yhsbToken);
        const res = await api_user.userApi.autoLogin({
          mdToken: userInfo.yhsbToken
        });
        common_vendor.index.__f__("log", "at App.vue:22", "自动登录", res.data);
        common_vendor.index.setStorageSync("userInfo", res.data);
      } catch (error) {
        common_vendor.index.__f__("error", "at App.vue:28", "自动登录失败", error);
      }
    } else {
      common_vendor.index.__f__("log", "at App.vue:33", "无token，跳过自动登录");
    }
  },
  onHide: function() {
    common_vendor.index.__f__("log", "at App.vue:37", "App Hide");
  }
};
function createApp() {
  const app = common_vendor.createSSRApp(_sfc_main);
  app.use(store_index.pinia);
  app.use(common_vendor.uviewPlus);
  return {
    app
  };
}
createApp().app.mount("#app");
exports.createApp = createApp;
//# sourceMappingURL=../.sourcemap/mp-weixin/app.js.map
