|
@@ -3,12 +3,14 @@ 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_popup2 = common_vendor.resolveComponent("uni-popup");
|
|
|
+ (_easycom_uni_segmented_control2 + _easycom_uni_icons2 + _easycom_uni_popup2)();
|
|
|
}
|
|
|
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";
|
|
|
+const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
|
|
|
if (!Math) {
|
|
|
- (_easycom_uni_segmented_control + _easycom_uni_icons)();
|
|
|
+ (_easycom_uni_segmented_control + _easycom_uni_icons + _easycom_uni_popup)();
|
|
|
}
|
|
|
const _sfc_main = common_vendor.defineComponent({
|
|
|
__name: "info",
|
|
@@ -23,6 +25,7 @@ const _sfc_main = common_vendor.defineComponent({
|
|
|
const id = common_vendor.ref("");
|
|
|
const user = common_vendor.ref({});
|
|
|
const numberList = common_vendor.ref([]);
|
|
|
+ const popup = common_vendor.ref(null);
|
|
|
common_vendor.onLoad(async (options) => {
|
|
|
id.value = options && options.id;
|
|
|
common_vendor.index.setNavigationBarTitle({
|
|
@@ -86,7 +89,7 @@ const _sfc_main = common_vendor.defineComponent({
|
|
|
if (data)
|
|
|
return data.dictLabel;
|
|
|
} else
|
|
|
- return 0;
|
|
|
+ return "0制";
|
|
|
};
|
|
|
const toInfo = (name) => {
|
|
|
common_vendor.index.navigateTo({
|
|
@@ -94,10 +97,37 @@ const _sfc_main = common_vendor.defineComponent({
|
|
|
});
|
|
|
};
|
|
|
const toEdit = async () => {
|
|
|
- console.log("编辑");
|
|
|
+ popup.value.open();
|
|
|
+ };
|
|
|
+ const toAgain = async () => {
|
|
|
+ console.log("重新编辑");
|
|
|
+ };
|
|
|
+ const toCancel = async () => {
|
|
|
+ common_vendor.index.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: "您确定取消比赛吗?",
|
|
|
+ success: async function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ const res2 = await $api(`game/${info.value.id}`, "DELETE", {});
|
|
|
+ if (res2.code == 200) {
|
|
|
+ common_vendor.index.navigateBack({
|
|
|
+ delta: 1
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ common_vendor.index.showToast({
|
|
|
+ title: res2.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
const toCopy = async () => {
|
|
|
console.log("复用");
|
|
|
+ common_vendor.index.navigateTo({
|
|
|
+ url: `/pagesHome/draft/index?id=${info.value.id}`
|
|
|
+ });
|
|
|
};
|
|
|
const onLeave = async () => {
|
|
|
console.log("请假");
|
|
@@ -106,82 +136,116 @@ const _sfc_main = common_vendor.defineComponent({
|
|
|
console.log("报名");
|
|
|
};
|
|
|
const searchShare = () => {
|
|
|
+ let titleName = "";
|
|
|
+ if (info.value.type == "0")
|
|
|
+ titleName = "友谊赛";
|
|
|
+ else if (info.value.type == "1")
|
|
|
+ titleName = "联赛";
|
|
|
$config.share = {
|
|
|
- title: `${user.value.name || "暂无名称"}邀请你报名${info.value.title || "暂无比赛名称"}`,
|
|
|
+ title: `${user.value.name || user.value.nickname || "暂无昵称"}邀请你报名${titleName || "暂无比赛名称"}`,
|
|
|
path: `/pagesHome/share/index?id=${info.value.id}`
|
|
|
|
|
|
};
|
|
|
};
|
|
|
+ const toClose = () => {
|
|
|
+ popup.value.close();
|
|
|
+ };
|
|
|
return (_ctx, _cache) => {
|
|
|
- var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
|
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
|
return common_vendor.e({
|
|
|
- a: info.value.status == "0" && info.value.type == "0"
|
|
|
- }, info.value.status == "0" && info.value.type == "0" ? {
|
|
|
- b: common_vendor.t(getNumber((_b2 = (_a2 = info.value) == null ? void 0 : _a2.matchInfo) == null ? void 0 : _b2.number))
|
|
|
- } : {
|
|
|
- c: common_vendor.t(info.value.number || 0),
|
|
|
- d: common_vendor.t(info.value.wheel || 0)
|
|
|
+ a: info.value.type == "0"
|
|
|
+ }, info.value.type == "0" ? common_vendor.e({
|
|
|
+ b: info.value.status == "0"
|
|
|
+ }, info.value.status == "0" ? {} : {}, {
|
|
|
+ c: common_vendor.t(getNumber((_b2 = (_a2 = info.value) == null ? void 0 : _a2.matchInfo) == null ? void 0 : _b2.number))
|
|
|
+ }) : {
|
|
|
+ d: common_vendor.t(getNumber((_d = (_c = info.value) == null ? void 0 : _c.matchInfo) == null ? void 0 : _d.number)),
|
|
|
+ e: common_vendor.t(info.value.wheel || 0)
|
|
|
}, {
|
|
|
- e: ((_d = (_c = info.value) == null ? void 0 : _c.redInfo) == null ? void 0 : _d.logo) || config.value.logoUrl,
|
|
|
- f: common_vendor.t(((_f = (_e = info.value) == null ? void 0 : _e.redInfo) == null ? void 0 : _f.name) || "暂无红方名称"),
|
|
|
- g: info.value.status == "0"
|
|
|
+ f: ((_f = (_e = info.value) == null ? void 0 : _e.redInfo) == null ? void 0 : _f.logo) || config.value.logoUrl,
|
|
|
+ g: common_vendor.t(((_h = (_g = info.value) == null ? void 0 : _g.redInfo) == null ? void 0 : _h.name) || "暂无红方名称"),
|
|
|
+ h: info.value.status == "0"
|
|
|
}, info.value.status == "0" ? {} : {
|
|
|
- h: common_vendor.t(info.value.redScore || 0),
|
|
|
- i: common_vendor.t(info.value.blueScore || 0)
|
|
|
+ i: common_vendor.t(info.value.redScore || 0),
|
|
|
+ j: common_vendor.t(info.value.blueScore || 0)
|
|
|
+ }, {
|
|
|
+ k: ((_j = (_i = info.value) == null ? void 0 : _i.blueInfo) == null ? void 0 : _j.logo) || config.value.logoUrl,
|
|
|
+ l: common_vendor.t(((_l = (_k = info.value) == null ? void 0 : _k.blueInfo) == null ? void 0 : _l.name) || "暂无蓝方名称"),
|
|
|
+ m: common_vendor.t(getDayOfWeek(info.value.startTime)),
|
|
|
+ n: common_vendor.t(info.value.time || "暂无时间"),
|
|
|
+ o: info.value.type == "0"
|
|
|
+ }, info.value.type == "0" ? {
|
|
|
+ p: common_vendor.t(((_n = (_m = info.value) == null ? void 0 : _m.matchInfo) == null ? void 0 : _n.address) || "暂无地点")
|
|
|
+ } : {
|
|
|
+ q: common_vendor.t(((_p = (_o = info.value) == null ? void 0 : _o.leagueInfo) == null ? void 0 : _p.address) || "暂无地点")
|
|
|
}, {
|
|
|
- j: ((_h = (_g = info.value) == null ? void 0 : _g.blueInfo) == null ? void 0 : _h.logo) || config.value.logoUrl,
|
|
|
- k: common_vendor.t(((_j = (_i = info.value) == null ? void 0 : _i.blueInfo) == null ? void 0 : _j.name) || "暂无蓝方名称"),
|
|
|
- l: common_vendor.t(getDayOfWeek(info.value.startTime)),
|
|
|
- m: common_vendor.t(info.value.time || "暂无时间"),
|
|
|
- n: common_vendor.t(((_l = (_k = info.value) == null ? void 0 : _k.matchInfo) == null ? void 0 : _l.address) || "暂无地点"),
|
|
|
- o: common_vendor.o(onClickItem),
|
|
|
- p: common_vendor.p({
|
|
|
+ r: common_vendor.o(onClickItem),
|
|
|
+ s: common_vendor.p({
|
|
|
current: current.value,
|
|
|
values: list.value,
|
|
|
styleType: "text",
|
|
|
activeColor: "#dd524d"
|
|
|
}),
|
|
|
- q: common_vendor.t(((_n = (_m = info.value) == null ? void 0 : _m.matchInfo) == null ? void 0 : _n.member) || "0"),
|
|
|
- r: common_vendor.p({
|
|
|
+ t: common_vendor.t(((_r = (_q = info.value) == null ? void 0 : _q.matchInfo) == null ? void 0 : _r.member) || "0"),
|
|
|
+ v: common_vendor.p({
|
|
|
type: "right",
|
|
|
size: "20",
|
|
|
color: "#999999"
|
|
|
}),
|
|
|
- s: common_vendor.o(($event) => toInfo("未回应队员")),
|
|
|
- t: common_vendor.p({
|
|
|
+ w: common_vendor.o(($event) => toInfo("未回应队员")),
|
|
|
+ x: common_vendor.p({
|
|
|
type: "redo-filled",
|
|
|
size: "15",
|
|
|
color: "#ffffff"
|
|
|
}),
|
|
|
- v: common_vendor.t(((_p = (_o = info.value) == null ? void 0 : _o.matchInfo) == null ? void 0 : _p.member) || "0"),
|
|
|
- w: common_vendor.p({
|
|
|
+ y: common_vendor.t(((_t = (_s = info.value) == null ? void 0 : _s.matchInfo) == null ? void 0 : _t.member) || "0"),
|
|
|
+ z: common_vendor.p({
|
|
|
type: "right",
|
|
|
size: "20",
|
|
|
color: "#999999"
|
|
|
}),
|
|
|
- x: common_vendor.o(($event) => toInfo("已回应队员")),
|
|
|
- y: common_vendor.t(((_r = (_q = info.value) == null ? void 0 : _q.matchInfo) == null ? void 0 : _r.member) || "0"),
|
|
|
- z: common_vendor.t(((_t = (_s = info.value) == null ? void 0 : _s.matchInfo) == null ? void 0 : _t.member) || "0"),
|
|
|
- A: current.value === 0,
|
|
|
- B: current.value === 1,
|
|
|
- C: info.value.status == "0" || info.value.status == "1"
|
|
|
+ A: common_vendor.o(($event) => toInfo("已回应队员")),
|
|
|
+ B: common_vendor.t(((_v = (_u = info.value) == null ? void 0 : _u.matchInfo) == null ? void 0 : _v.member) || "0"),
|
|
|
+ C: common_vendor.n(info.value.status == "3" ? "count_1" : "count_2"),
|
|
|
+ D: common_vendor.t(((_x = (_w = info.value) == null ? void 0 : _w.matchInfo) == null ? void 0 : _x.member) || "0"),
|
|
|
+ E: common_vendor.n(info.value.status == "3" ? "count_1" : "count_2"),
|
|
|
+ F: info.value.status == "3"
|
|
|
+ }, info.value.status == "3" ? {
|
|
|
+ G: common_vendor.t(((_z = (_y = info.value) == null ? void 0 : _y.matchInfo) == null ? void 0 : _z.member) || "0"),
|
|
|
+ H: common_vendor.n(info.value.status == "3" ? "count_1" : "count_2")
|
|
|
+ } : {}, {
|
|
|
+ I: current.value === 0,
|
|
|
+ J: current.value === 1,
|
|
|
+ K: info.value.status == "0" || info.value.status == "1"
|
|
|
}, info.value.status == "0" || info.value.status == "1" ? {
|
|
|
- D: common_vendor.o(toEdit),
|
|
|
- E: common_vendor.p({
|
|
|
+ L: common_vendor.o(toEdit),
|
|
|
+ M: common_vendor.p({
|
|
|
type: "compose",
|
|
|
size: "20",
|
|
|
color: "#696969"
|
|
|
}),
|
|
|
- F: common_vendor.o(toCopy),
|
|
|
- G: common_vendor.p({
|
|
|
+ N: common_vendor.o(toCopy),
|
|
|
+ O: common_vendor.p({
|
|
|
["custom-prefix"]: "iconfont",
|
|
|
type: "icon-icon_cz",
|
|
|
size: "20",
|
|
|
color: "#696969"
|
|
|
}),
|
|
|
- H: common_vendor.o(onLeave),
|
|
|
- I: common_vendor.o(onEnroll)
|
|
|
- } : {});
|
|
|
+ P: common_vendor.o(onLeave),
|
|
|
+ Q: common_vendor.o(onEnroll)
|
|
|
+ } : {}, {
|
|
|
+ R: common_vendor.o(toAgain),
|
|
|
+ S: common_vendor.o(toCancel),
|
|
|
+ T: common_vendor.o(toClose),
|
|
|
+ U: common_vendor.sr(popup, "24c37ea1-6", {
|
|
|
+ "k": "popup"
|
|
|
+ }),
|
|
|
+ V: common_vendor.o(_ctx.change),
|
|
|
+ W: common_vendor.p({
|
|
|
+ ["background-color"]: "rgba(0,0,0,0)",
|
|
|
+ type: "center"
|
|
|
+ })
|
|
|
+ });
|
|
|
};
|
|
|
}
|
|
|
});
|