index.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const common_assets = require("../../common/assets.js");
  4. const utils_userCache = require("../../utils/userCache.js");
  5. const _sfc_main = {
  6. __name: "index",
  7. setup(__props) {
  8. const userInfo = common_vendor.ref(null);
  9. common_vendor.onMounted(() => {
  10. loadUserInfo();
  11. });
  12. const loadUserInfo = () => {
  13. const info = utils_userCache.getUserInfo();
  14. if (info) {
  15. userInfo.value = info;
  16. }
  17. };
  18. const makeCall = () => {
  19. common_vendor.index.makePhoneCall({
  20. phoneNumber: "4000000000"
  21. });
  22. };
  23. const shareCard = () => {
  24. common_vendor.index.showShareMenu({
  25. withShareTicket: true
  26. });
  27. };
  28. const viewAllVisitors = () => {
  29. common_vendor.index.navigateTo({
  30. url: "/pages/visitors/list"
  31. });
  32. };
  33. const navigateTo = (page) => {
  34. common_vendor.index.showToast({
  35. title: `功能开发中:${page}`,
  36. icon: "none"
  37. });
  38. };
  39. const viewAllCalendar = () => {
  40. common_vendor.index.navigateTo({
  41. url: "/pages/calendar/list"
  42. });
  43. };
  44. return (_ctx, _cache) => {
  45. return {
  46. a: common_assets._imports_0,
  47. b: common_vendor.o(makeCall, "bf"),
  48. c: common_vendor.o(shareCard, "7f"),
  49. d: common_assets._imports_1,
  50. e: common_vendor.o(viewAllVisitors, "5e"),
  51. f: common_assets._imports_2,
  52. g: common_vendor.o(($event) => navigateTo("clue"), "4e"),
  53. h: common_vendor.o(($event) => navigateTo("customer"), "ef"),
  54. i: common_vendor.o(($event) => navigateTo("contact"), "ad"),
  55. j: common_vendor.o(($event) => navigateTo("public-pool"), "91"),
  56. k: common_vendor.o(($event) => navigateTo("opportunity"), "03"),
  57. l: common_vendor.o(($event) => navigateTo("payment"), "68"),
  58. m: common_vendor.o(($event) => navigateTo("product"), "77"),
  59. n: common_vendor.o(($event) => navigateTo("all"), "ae"),
  60. o: common_vendor.o(viewAllCalendar, "55")
  61. };
  62. };
  63. }
  64. };
  65. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]);
  66. wx.createPage(MiniProgramPage);
  67. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map