index.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. if (!Array) {
  4. const _easycom_uni_collapse_item2 = common_vendor.resolveComponent("uni-collapse-item");
  5. const _easycom_uni_collapse2 = common_vendor.resolveComponent("uni-collapse");
  6. (_easycom_uni_collapse_item2 + _easycom_uni_collapse2)();
  7. }
  8. const _easycom_uni_collapse_item = () => "../../uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js";
  9. const _easycom_uni_collapse = () => "../../uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js";
  10. if (!Math) {
  11. (_easycom_uni_collapse_item + _easycom_uni_collapse)();
  12. }
  13. const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  14. __name: "index",
  15. setup(__props) {
  16. var _a;
  17. (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
  18. const config = common_vendor.ref({ logoUrl: "" });
  19. const one = common_vendor.ref("报名成功(0)");
  20. const two = common_vendor.ref("请假(0)");
  21. const thr = common_vendor.ref("未回应队员(6)");
  22. const accordionVal = common_vendor.ref("2");
  23. const is_yes = common_vendor.ref(true);
  24. const list = common_vendor.ref([{ id: 1, phone: "1234567890" }, { id: 1, name: "肝帝集团队" }]);
  25. const id = common_vendor.ref("");
  26. common_vendor.onLoad(async (options) => {
  27. id.value = options && options.id;
  28. if (options && options.name && options.name == "已回应队员") {
  29. is_yes.value = false;
  30. thr.value = "已回应队员(6)";
  31. }
  32. common_vendor.index.setNavigationBarTitle({
  33. title: options && options.name || "报名队员"
  34. });
  35. await searchConfig();
  36. await search();
  37. });
  38. const searchConfig = async () => {
  39. config.value = common_vendor.index.getStorageSync("config");
  40. };
  41. const search = async () => {
  42. if (id.value)
  43. ;
  44. };
  45. const change = async (e) => {
  46. console.log(e);
  47. };
  48. const toPerson = async (item) => {
  49. console.log(item);
  50. };
  51. return (_ctx, _cache) => {
  52. return {
  53. a: common_vendor.f(list.value, (item, index, i0) => {
  54. return {
  55. a: item.icon || config.value.logoUrl,
  56. b: common_vendor.t(item.name || item.phone),
  57. c: index,
  58. d: common_vendor.o(($event) => toPerson(item), index)
  59. };
  60. }),
  61. b: common_vendor.p({
  62. title: one.value
  63. }),
  64. c: common_vendor.f(list.value, (item, index, i0) => {
  65. return {
  66. a: item.icon || config.value.logoUrl,
  67. b: common_vendor.t(item.name || item.phone),
  68. c: index,
  69. d: common_vendor.o(($event) => toPerson(item), index)
  70. };
  71. }),
  72. d: common_vendor.p({
  73. title: two.value
  74. }),
  75. e: common_vendor.f(list.value, (item, index, i0) => {
  76. return common_vendor.e({
  77. a: item.icon || config.value.logoUrl,
  78. b: common_vendor.t(item.name || item.phone)
  79. }, is_yes.value ? {
  80. c: common_vendor.o(
  81. //@ts-ignore
  82. (...args) => _ctx.onLeave && _ctx.onLeave(...args),
  83. index
  84. )
  85. } : {
  86. d: common_vendor.o(
  87. //@ts-ignore
  88. (...args) => _ctx.onLeave && _ctx.onLeave(...args),
  89. index
  90. )
  91. }, {
  92. e: index,
  93. f: common_vendor.o(($event) => toPerson(item), index)
  94. });
  95. }),
  96. f: is_yes.value,
  97. g: common_vendor.p({
  98. title: thr.value
  99. }),
  100. h: common_vendor.o(change),
  101. i: common_vendor.o(($event) => accordionVal.value = $event),
  102. j: common_vendor.p({
  103. accordion: true,
  104. modelValue: accordionVal.value
  105. })
  106. };
  107. };
  108. }
  109. });
  110. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-aedfc046"], ["__file", "D:/project/足球比赛/match_applet/pagesHome/enroll/index.vue"]]);
  111. wx.createPage(MiniProgramPage);