"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const common_vendor = require("./common/vendor.js");
const config_globalData = require("./config/globalData.js");
const config_menu = require("./config/menu.js");
const store_index = require("./store/index.js");
if (!Math) {
  "./pages/business/tabbar/homePage/homePage.js";
  "./pages/business/tabbar/personalCenter/personalCenter.js";
  "./pages/business/tabbar/transferPage/transferPage.js";
  "./pagesAdmin/article/business/article/detail/detail.js";
  "./pagesAdmin/satisfaction/business/satisfactionQuestions/satisfactionQuestions.js";
  "./pagesCrm/business/home/home.js";
  "./pagesCrm/business/schemeDetail/schemeDetail.js";
}
let app = null;
const beforeMain = async () => {
  common_vendor.showLoading();
  await common_vendor.useFrontEndConfigVersion();
  let has = await common_vendor.useSetFrontEndConfig();
  if (has)
    return;
  await common_vendor.useAppStatus();
  common_vendor.hideLoading();
  if (!app.globalData.logSuccess) {
    main();
  } else {
    if (app.globalData.hasWebsocket) {
      connectWebsocket(true);
    }
  }
};
const main = async function() {
  let isUpdateManager = false;
  isUpdateManager = app.globalData.accountInfo.miniProgram.envVersion == "develop" ? false : await common_vendor.useGetUpdateManager();
  if (isUpdateManager) {
    return;
  }
  common_vendor.showLoading();
  app.globalData.smallPro_systemInfo = JSON.stringify(common_vendor.index.getSystemInfoSync());
  const resp = await common_vendor.useSmallProgramLogin(app);
  if (resp) {
    app.globalData.logSuccess = true;
    await common_vendor.useGetSysAppPageList();
    await common_vendor.usePreserMember();
    if (common_vendor.index.getStorageSync("frontEndConfigRequest") || common_vendor.isEmpty(common_vendor.index.getStorageSync("formConfigList"))) {
      await common_vendor.useSetFrontEndForm();
    }
    if (common_vendor.index.getStorageSync("frontEndConfigRequest") || common_vendor.isEmpty(common_vendor.index.getStorageSync("menuList"))) {
      await common_vendor.useSetMenuList(config_menu.menu);
    }
    common_vendor.hideLoading();
    if (app.globalData.hasWebsocket)
      ;
    if (app.loginReadyCallBack && typeof app.loginReadyCallBack == "function") {
      app.loginReadyCallBack();
    }
  }
};
const _sfc_main = {
  globalData: config_globalData.GLOBALDATA,
  onLaunch: function(options) {
    common_vendor.index.__f__("log", "at App.vue:94", "App Launch");
    common_vendor.index.__f__("log", "at App.vue:95", "应用启动路径：", options.path);
    app = this.$scope;
    app.globalData.accountInfo = common_vendor.index.getAccountInfoSync();
  },
  onShow: function(options) {
    common_vendor.index.__f__("log", "at App.vue:110", "App Show");
    common_vendor.index.__f__("log", "at App.vue:111", "应用启动路径：", options.path);
    beforeMain();
  },
  onHide: function() {
    common_vendor.index.__f__("log", "at App.vue:117", "App Hide");
  },
  methods: {
    loginReadyCallBack: () => {
    }
  }
};
function createApp() {
  const app2 = common_vendor.createSSRApp(_sfc_main).use(store_index.store);
  return {
    app: app2
  };
}
createApp().app.mount("#app");
exports.createApp = createApp;
//# sourceMappingURL=../.sourcemap/mp-weixin/app.js.map
