You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

63 lines
2.7 KiB

"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
__name: "payment",
setup(__props) {
const filterType = common_vendor.ref("all");
const payments = common_vendor.ref([
{ id: 1, username: "李慧琳", room: "706", pay_amount: 75, pay_date: "2025-07-31", pay_status: "0", remark: "7月宿舍费" },
{ id: 2, username: "李慧琳", room: "706", pay_amount: 75, pay_date: "2025-06-30", pay_status: "0", remark: "6月宿舍费" },
{ id: 3, username: "李慧琳", room: "706", pay_amount: 75, pay_date: "2025-05-28", pay_status: "0", remark: "5月宿舍费" },
{ id: 4, username: "李慧琳", room: "706", pay_amount: 80, pay_date: "2025-08-31", pay_status: "1", remark: "8月宿舍费" }
]);
const res = common_vendor.computed(() => {
switch (filterType.value) {
case "pass":
return payments.value.filter((item) => item.pay_status === "0");
case "pending":
return payments.value.filter((item) => item.pay_status === "1");
default:
return payments.value;
}
});
common_vendor.onShow(() => {
const isLogin = common_vendor.index.getStorageSync("isLogin");
common_vendor.index.__f__("log", "at pages/payment/payment.vue:86", isLogin);
if (!isLogin) {
common_vendor.index.redirectTo({
url: "/pages/login/login"
});
}
});
return (_ctx, _cache) => {
return common_vendor.e({
a: filterType.value === "all" ? 1 : "",
b: common_vendor.o(($event) => filterType.value = "all"),
c: filterType.value === "pass" ? 1 : "",
d: common_vendor.o(($event) => filterType.value = "pass"),
e: filterType.value === "pending" ? 1 : "",
f: common_vendor.o(($event) => filterType.value = "pending"),
g: common_vendor.f(res.value, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.room),
b: common_vendor.t(item.pay_status === "0" ? "已缴费" : "待缴费"),
c: item.pay_status === "0" ? 1 : "",
d: item.pay_status === "1" ? 1 : "",
e: common_vendor.t(item.pay_amount),
f: common_vendor.t(item.pay_date),
g: common_vendor.t(item.username),
h: item.remark
}, item.remark ? {
i: common_vendor.t(item.remark)
} : {}, {
j: index
});
}),
h: res.value.length === 0
}, res.value.length === 0 ? {} : {});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-eade9ab2"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/payment/payment.js.map