index.js 2.7 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. _easycom_uni_segmented_control2();
  6. }
  7. const _easycom_uni_segmented_control = () => "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js";
  8. if (!Math) {
  9. _easycom_uni_segmented_control();
  10. }
  11. const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  12. __name: "index",
  13. setup(__props) {
  14. var _a;
  15. (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
  16. const id = common_vendor.ref("");
  17. const config = common_vendor.ref({ logoUrl: "" });
  18. const list = common_vendor.ref(["历史记录", "草稿箱"]);
  19. const current = common_vendor.ref(0);
  20. const historyList = common_vendor.ref([{ id: 1, title: "友谊赛" }, { id: 1, title: "肝帝联赛" }]);
  21. const draftsList = common_vendor.ref([{ id: 1, title: "友谊赛" }, { id: 1, title: "友谊赛" }]);
  22. common_vendor.onLoad(async (options) => {
  23. id.value = options && options.id;
  24. await searchConfig();
  25. await search();
  26. });
  27. const searchConfig = async () => {
  28. config.value = common_vendor.index.getStorageSync("config");
  29. };
  30. const search = async () => {
  31. if (id.value)
  32. ;
  33. };
  34. const onClickItem = (e) => {
  35. if (current.value !== e.currentIndex)
  36. current.value = e.currentIndex;
  37. };
  38. return (_ctx, _cache) => {
  39. return {
  40. a: common_vendor.o(onClickItem),
  41. b: common_vendor.p({
  42. current: current.value,
  43. values: list.value,
  44. styleType: "text",
  45. activeColor: "#dd524d"
  46. }),
  47. c: common_vendor.f(historyList.value, (item, index, i0) => {
  48. return {
  49. a: common_vendor.t(item.title || "暂无名称"),
  50. b: common_vendor.t(item.title || "暂无类型"),
  51. c: common_vendor.t(item.per || "0"),
  52. d: common_vendor.t(item.address || "暂无地址"),
  53. e: index
  54. };
  55. }),
  56. d: current.value === 0,
  57. e: common_vendor.f(draftsList.value, (item, index, i0) => {
  58. return {
  59. a: common_vendor.t(item.title || "暂无名称"),
  60. b: common_vendor.t(item.title || "暂无类型"),
  61. c: common_vendor.t(item.address || "暂无地址"),
  62. d: index
  63. };
  64. }),
  65. f: current.value === 1
  66. };
  67. };
  68. }
  69. });
  70. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-872b3c9c"], ["__file", "D:/project/足球比赛/match_applet/pagesHome/draft/index.vue"]]);
  71. wx.createPage(MiniProgramPage);