index.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. const toAdd = async () => {
  41. console.log("保存草稿");
  42. };
  43. const toCopy = async () => {
  44. console.log("复用");
  45. };
  46. return (_ctx, _cache) => {
  47. return {
  48. a: common_vendor.o(onClickItem),
  49. b: common_vendor.p({
  50. current: current.value,
  51. values: list.value,
  52. styleType: "text",
  53. activeColor: "#dd524d"
  54. }),
  55. c: current.value === 0,
  56. d: current.value === 1,
  57. e: current.value === 2,
  58. f: common_vendor.o(toAdd),
  59. g: common_vendor.p({
  60. ["custom-prefix"]: "iconfont",
  61. type: "icon-caogao04",
  62. size: "20",
  63. color: "#696969"
  64. }),
  65. h: common_vendor.o(toCopy),
  66. i: common_vendor.p({
  67. ["custom-prefix"]: "iconfont",
  68. type: "icon-icon_cz",
  69. size: "20",
  70. color: "#696969"
  71. })
  72. };
  73. };
  74. }
  75. });
  76. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-fe92273c"], ["__file", "D:/project/足球比赛/match_applet/pagesHome/create/index.vue"]]);
  77. wx.createPage(MiniProgramPage);