splash.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const _sfc_main = {
  4. __name: "splash",
  5. setup(__props) {
  6. const loadingText = common_vendor.ref("正在加载...");
  7. common_vendor.onMounted(() => {
  8. initApp();
  9. });
  10. const initApp = async () => {
  11. try {
  12. loadingText.value = "检查登录状态...";
  13. if (true) {
  14. common_vendor.index.reLaunch({
  15. url: "/pages/index/index"
  16. });
  17. }
  18. } catch (error) {
  19. common_vendor.index.__f__("error", "at pages/splash/splash.vue:68", "初始化失败:", error);
  20. common_vendor.index.reLaunch({
  21. url: "/pages/login/login"
  22. });
  23. }
  24. };
  25. return (_ctx, _cache) => {
  26. return {
  27. a: common_vendor.t(loadingText.value)
  28. };
  29. };
  30. }
  31. };
  32. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-b5d3b004"]]);
  33. wx.createPage(MiniProgramPage);
  34. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/splash/splash.js.map