Files
hnxdcount-uniapp/unpackage/dist/dev/mp-alipay/pages/activity/detail813.js
PC-202306242200\Administrator dac42e3b0c first commit
2026-03-28 23:09:02 +08:00

95 lines
3.1 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
const api_api = require("../../api/api.js");
if (!Array) {
const _easycom_mp_html2 = common_vendor.resolveComponent("mp-html");
const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
(_easycom_mp_html2 + _easycom_up_button2)();
}
const _easycom_mp_html = () => "../../uni_modules/mp-html/components/mp-html/mp-html.js";
const _easycom_up_button = () => "../../uni_modules/uview-plus/components/u-button/u-button.js";
if (!Math) {
(_easycom_mp_html + _easycom_up_button)();
}
const _sfc_main = {
__name: "detail813",
setup(__props) {
let info = common_vendor.ref({});
let type = common_vendor.ref("");
common_vendor.onLoad(async (options) => {
type.value = options.type;
var _res;
if (options.type == 2) {
_res = await api_api.activityUserInfo({ id: options.id });
} else {
_res = await api_api.activityInfo({ id: options.id });
}
info.value = _res;
});
const getDate = (type2) => {
const date2 = /* @__PURE__ */ new Date();
let year = date2.getFullYear();
let month = date2.getMonth() + 1;
let day = date2.getDate();
if (type2 === "start") {
year = year - 60;
} else if (type2 === "end") {
year = year + 2;
}
month = month > 9 ? month : "0" + month;
day = day > 9 ? day : "0" + day;
return `${year}-${month}-${day}`;
};
const bindDateChange = (e) => {
date.value = e.detail.value;
};
let startDate = common_vendor.computed(() => {
return getDate("start");
});
let endDate = common_vendor.computed(() => {
return getDate("end");
});
const currentDate = getDate({
format: true
});
let date = common_vendor.ref(currentDate);
let getActCreate = () => {
api_api.activityUserConfirm({
id: info.value.id,
orderDate: date.value
}).then((res) => {
common_vendor.index.showToast({ title: "认领成功", icon: "none" });
});
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
content: common_vendor.unref(info).detail
}),
b: common_vendor.unref(type) == 2
}, common_vendor.unref(type) == 2 ? {
c: common_vendor.t(common_vendor.unref(info).deviceId),
d: common_vendor.t(common_vendor.unref(info).createTime)
} : {}, {
e: common_vendor.unref(type) != 2
}, common_vendor.unref(type) != 2 ? common_vendor.e({
f: !_ctx.ac
}, !_ctx.ac ? {
g: common_vendor.t(common_vendor.unref(date)),
h: common_vendor.unref(startDate),
i: common_vendor.unref(endDate),
j: common_vendor.unref(date),
k: common_vendor.o(bindDateChange)
} : {}, {
l: common_vendor.o(common_vendor.unref(getActCreate)),
m: common_vendor.p({
color: "#4874e5",
type: "primary"
})
}) : {});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-393d6d4d"]]);
my.createPage(MiniProgramPage);