"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const common_vendor = require("./common/vendor.js");
const common_api = require("./common/api.js");
const config = require("./config.js");
const common_share = require("./common/share.js");
if (!Math) {
  "./pages/index/index.js";
  "./pages/home/index.js";
  "./pages/teacher/index.js";
  "./pages/my/index.js";
  "./pagesHome/agree/index.js";
  "./pagesMy/order/index.js";
  "./pagesMy/course/index.js";
  "./pagesMy/follow/index.js";
  "./pagesMy/account/index.js";
  "./pagesMy/opinion/index.js";
}
const _sfc_main = {
  onLaunch: function() {
    const that = this;
    that.forceUpdate();
  },
  onShow: function() {
    console.log("App Show");
  },
  onHide: function() {
    console.log("App Hide");
  },
  methods: {
    // 强制更新
    forceUpdate() {
      let system = common_vendor.index.getSystemInfoSync();
      if (system.uniPlatform == "mp-weixin") {
        const updateManager = common_vendor.index.getUpdateManager();
        updateManager.onCheckForUpdate(function(res) {
          console.log(res.hasUpdate);
        });
        updateManager.onUpdateReady(function(res) {
          common_vendor.index.showModal({
            title: "更新提示",
            content: "新版本已经准备好，是否重启应用？",
            success(res2) {
              if (res2.confirm) {
                common_vendor.index.clearStorage();
                updateManager.applyUpdate();
              }
            }
          });
        });
        updateManager.onUpdateFailed(function(res) {
          console.log(res);
          console.log("更新失败");
        });
      }
    }
  }
};
const App = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/project/学吧/learn_applet/App.vue"]]);
function createApp() {
  const app = common_vendor.createSSRApp(App);
  app.use(common_vendor.uviewPlus);
  app.provide("$api", common_api.requestBase);
  app.provide("$app", common_api.requestApp);
  app.provide("$apifile", common_api.requestFile);
  app.provide("$config", config.configInfo);
  app.provide("$share", common_share.share);
  return {
    app
  };
}
createApp().app.mount("#app");
exports.createApp = createApp;
