123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- "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([]);
- 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("复用");
- };
- 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.p({
- typeList: typeList.value,
- numberList: numberList.value,
- durationList: durationList.value,
- openList: openList.value
- }),
- d: current.value === 0,
- e: common_vendor.p({
- typeList: matchList.value,
- durationList: durationList.value,
- openList: openList.value,
- type: "0"
- }),
- f: current.value === 1,
- g: common_vendor.p({
- activityList: activityList.value,
- durationList: durationList.value,
- openList: openList.value,
- type: "1"
- }),
- h: current.value === 2,
- i: common_vendor.o(toAdd),
- j: common_vendor.p({
- ["custom-prefix"]: "iconfont",
- type: "icon-caogao04",
- size: "20",
- color: "#696969"
- }),
- k: common_vendor.o(toCopy),
- l: common_vendor.p({
- ["custom-prefix"]: "iconfont",
- type: "icon-icon_cz",
- size: "20",
- color: "#696969"
- })
- };
- };
- }
- });
- 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);
|