index.js 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. if (!Array) {
  4. const _easycom_uni_segmented_control2 = common_vendor.resolveComponent("uni-segmented-control");
  5. const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  6. (_easycom_uni_segmented_control2 + _easycom_uni_icons2)();
  7. }
  8. const _easycom_uni_segmented_control = () => "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js";
  9. const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
  10. if (!Math) {
  11. (_easycom_uni_segmented_control + match + activity + _easycom_uni_icons)();
  12. }
  13. const activity = () => "./components/activity.js";
  14. const match = () => "./components/match.js";
  15. const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  16. __name: "index",
  17. setup(__props) {
  18. var _a;
  19. (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
  20. const config = common_vendor.ref({});
  21. const id = common_vendor.ref("");
  22. const list = common_vendor.ref(["友谊赛", "训练", "活动"]);
  23. const current = common_vendor.ref(0);
  24. common_vendor.onLoad(async (options) => {
  25. id.value = options && options.id;
  26. await searchConfig();
  27. await search();
  28. });
  29. const searchConfig = async () => {
  30. config.value = common_vendor.index.getStorageSync("config");
  31. };
  32. const search = async () => {
  33. if (id.value)
  34. ;
  35. };
  36. const onClickItem = (e) => {
  37. if (current.value !== e.currentIndex)
  38. current.value = e.currentIndex;
  39. };
  40. return (_ctx, _cache) => {
  41. return {
  42. a: common_vendor.o(onClickItem),
  43. b: common_vendor.p({
  44. current: current.value,
  45. values: list.value,
  46. styleType: "text",
  47. activeColor: "#dd524d"
  48. }),
  49. c: current.value === 0,
  50. d: current.value === 1,
  51. e: current.value === 2,
  52. f: common_vendor.o(_ctx.toClose),
  53. g: common_vendor.p({
  54. ["custom-prefix"]: "iconfont",
  55. type: "icon-caogao04",
  56. size: "20",
  57. color: "#696969"
  58. }),
  59. h: common_vendor.o(_ctx.toClose),
  60. i: common_vendor.p({
  61. ["custom-prefix"]: "iconfont",
  62. type: "icon-icon_cz",
  63. size: "20",
  64. color: "#696969"
  65. })
  66. };
  67. };
  68. }
  69. });
  70. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-fe92273c"], ["__file", "D:/project/足球比赛/match_applet/pagesHome/create/index.vue"]]);
  71. wx.createPage(MiniProgramPage);