"use strict"; const common_vendor = require("../../common/vendor.js"); if (!Array) { const _easycom_uni_segmented_control2 = common_vendor.resolveComponent("uni-segmented-control"); const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons"); (_easycom_uni_segmented_control2 + _easycom_uni_icons2)(); } const _easycom_uni_segmented_control = () => "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js"; const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js"; if (!Math) { (_easycom_uni_segmented_control + match + activity + _easycom_uni_icons)(); } const activity = () => "./components/activity.js"; const match = () => "./components/match.js"; const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ __name: "index", setup(__props) { var _a; const $api = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api; const config = common_vendor.ref({}); const id = common_vendor.ref(""); const list = common_vendor.ref(["友谊赛", "训练", "活动"]); const current = common_vendor.ref(0); const typeList = common_vendor.ref([]); const numberList = common_vendor.ref([]); const matchList = common_vendor.ref([]); const activityList = common_vendor.ref([]); const durationList = common_vendor.ref([]); const openList = common_vendor.ref([]); const childRef0 = common_vendor.ref(); const childRef1 = common_vendor.ref(); const childRef2 = common_vendor.ref(); common_vendor.onLoad(async (options) => { id.value = options && options.id; await searchConfig(); await searchOther(); await search(); }); const searchConfig = async () => { config.value = common_vendor.index.getStorageSync("config"); }; const searchOther = async () => { let res; res = await $api(`dict/data/list`, "GET", { dictType: "sys_user_type", status: "0" }); if (res.code === 200 && res.total > 0) typeList.value = res.rows; res = await $api(`dict/data/list`, "GET", { dictType: "sys_match_number", status: "0" }); if (res.code === 200 && res.total > 0) numberList.value = res.rows; res = await $api(`dict/data/list`, "GET", { dictType: "sys_train_type", status: "0" }); if (res.code === 200 && res.total > 0) matchList.value = res.rows; res = await $api(`dict/data/list`, "GET", { dictType: "sys_activity_type", status: "0" }); if (res.code === 200 && res.total > 0) activityList.value = res.rows; res = await $api(`dict/data/list`, "GET", { dictType: "sys_match_duration", status: "0" }); if (res.code === 200 && res.total > 0) durationList.value = res.rows; res = await $api(`dict/data/list`, "GET", { dictType: "sys_yes_no", status: "0" }); if (res.code === 200 && res.total > 0) openList.value = res.rows; }; const search = async () => { if (id.value) ; }; const onClickItem = (e) => { if (current.value !== e.currentIndex) current.value = e.currentIndex; }; const toAdd = async () => { console.log("保存草稿"); }; const toCopy = async () => { console.log("复用"); }; const onSubmit = async () => { if (current.value == 0) childRef0.value.formSubmit(); else if (current.value == 1) childRef1.value.formSubmit(); else childRef2.value.formSubmit(); }; return (_ctx, _cache) => { return { a: common_vendor.o(onClickItem), b: common_vendor.p({ current: current.value, values: list.value, styleType: "text", activeColor: "#dd524d" }), c: common_vendor.sr(childRef0, "fe92273c-1", { "k": "childRef0" }), d: id.value, e: common_vendor.p({ id: id.value, typeList: typeList.value, numberList: numberList.value, durationList: durationList.value, openList: openList.value }), f: current.value === 0, g: common_vendor.sr(childRef1, "fe92273c-2", { "k": "childRef1" }), h: id.value, i: common_vendor.p({ id: id.value, typeList: matchList.value, durationList: durationList.value, openList: openList.value, type: current.value }), j: current.value === 1, k: common_vendor.sr(childRef2, "fe92273c-3", { "k": "childRef2" }), l: id.value, m: common_vendor.p({ id: id.value, activityList: activityList.value, durationList: durationList.value, openList: openList.value, type: current.value }), n: current.value === 2, o: common_vendor.o(toAdd), p: common_vendor.p({ ["custom-prefix"]: "iconfont", type: "icon-caogao04", size: "20", color: "#696969" }), q: common_vendor.o(toCopy), r: common_vendor.p({ ["custom-prefix"]: "iconfont", type: "icon-icon_cz", size: "20", color: "#696969" }), s: common_vendor.o(onSubmit) }; }; } }); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-fe92273c"], ["__file", "D:/project/足球比赛/match_applet/pagesHome/create/index.vue"]]); wx.createPage(MiniProgramPage);