index.js 1.4 KB
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
  __name: "index",
  setup(__props) {
    const app = getApp();
    common_vendor.ref(null);
    common_vendor.ref([]);
    common_vendor.onShow(() => {
      if (app.globalData.isLogin) {
        init();
      } else {
        app.firstLoadCallback = () => {
          init();
        };
      }
    });
    common_vendor.onLoad((option) => {
    });
    function goPath(path) {
      if (path)
        common_vendor.index.navigateTo({
          url: path
        });
    }
    function init() {
      common_vendor.index.showLoading({
        title: "加载中"
      });
      common_vendor.index.hideLoading();
    }
    return (_ctx, _cache) => {
      return {
        a: common_vendor.o(($event) => goPath("/training/trainList")),
        b: common_vendor.o(($event) => goPath("/match/index")),
        c: common_vendor.o(($event) => goPath("/training/trainList")),
        d: common_vendor.o(($event) => goPath()),
        e: common_vendor.o(($event) => goPath()),
        f: common_vendor.o(($event) => goPath()),
        g: common_vendor.o(($event) => goPath()),
        h: common_vendor.o(($event) => goPath("/myCenter/index"))
      };
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/yangyang/ztx_wx_minapp/pages/index/index.vue"]]);
wx.createPage(MiniProgramPage);