"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const utils_userCache = require("../../utils/userCache.js");
const _sfc_main = {
  __name: "index",
  setup(__props) {
    const userInfo = common_vendor.ref(null);
    common_vendor.onMounted(() => {
      loadUserInfo();
    });
    const loadUserInfo = () => {
      const info = utils_userCache.getUserInfo();
      if (info) {
        userInfo.value = info;
      }
    };
    const makeCall = () => {
      common_vendor.index.makePhoneCall({
        phoneNumber: "4000000000"
      });
    };
    const shareCard = () => {
      common_vendor.index.showShareMenu({
        withShareTicket: true
      });
    };
    const viewAllVisitors = () => {
      common_vendor.index.navigateTo({
        url: "/pages/visitors/list"
      });
    };
    const navigateTo = (page) => {
      common_vendor.index.showToast({
        title: `功能开发中：${page}`,
        icon: "none"
      });
    };
    const viewAllCalendar = () => {
      common_vendor.index.navigateTo({
        url: "/pages/calendar/list"
      });
    };
    return (_ctx, _cache) => {
      return {
        a: common_assets._imports_0,
        b: common_vendor.o(makeCall, "bf"),
        c: common_vendor.o(shareCard, "7f"),
        d: common_assets._imports_1,
        e: common_vendor.o(viewAllVisitors, "5e"),
        f: common_assets._imports_2,
        g: common_vendor.o(($event) => navigateTo("clue"), "4e"),
        h: common_vendor.o(($event) => navigateTo("customer"), "ef"),
        i: common_vendor.o(($event) => navigateTo("contact"), "ad"),
        j: common_vendor.o(($event) => navigateTo("public-pool"), "91"),
        k: common_vendor.o(($event) => navigateTo("opportunity"), "03"),
        l: common_vendor.o(($event) => navigateTo("payment"), "68"),
        m: common_vendor.o(($event) => navigateTo("product"), "77"),
        n: common_vendor.o(($event) => navigateTo("all"), "ae"),
        o: common_vendor.o(viewAllCalendar, "55")
      };
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map
