"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./common/vendor.js"),t=require("./utils/share.js");Math;const o={onLaunch:function(){console.log("App Launch");let t=e.index.getWindowInfo();e.provide("statusHeight",t.statusBarHeight),e.provide("windowWidth",t.windowWidth),e.provide("safeAreaTop",t.safeArea.top);var o=t.safeAreaInsets.bottom;let n=e.index.getMenuButtonBoundingClientRect();e.provide("navHeight",n.bottom+n.top-t.statusBarHeight),e.provide("menuTop",n.top),e.provide("menuHeight",n.height),e.provide("isiPhoneX",34==o)},onShow:function(){console.log("App Show"),this.updateManager()},onHide:function(){console.log("App Hide")},globalData:{mobileReg:/^1[3456789][0-9]{9}$/},methods:{updateManager(){const t=e.index.getUpdateManager();t.onCheckForUpdate((o=>{o.hasUpdate&&e.index.showModal({title:"更新提示",content:"检测到新版本，是否下载新版本并重启小程序？",success(o){o.confirm&&t.onUpdateReady((()=>{e.index.showModal({title:"更新提示",content:"新版本已经准备好，即将重启应用",showCancel:!1,success(e){e.confirm&&t.applyUpdate()}})}))},fail(e){}}),t.onUpdateFailed((()=>{e.index.showModal({title:"更新提示",content:"新版本下载失败",showCancel:!1})}))}))}}};function n(){const n=e.createSSRApp(o);return n.mixin(t.share),{app:n}}n().app.mount("#app"),exports.createApp=n;
