115 lines
4.1 KiB
JavaScript
115 lines
4.1 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const common_assets = require("../../common/assets.js");
|
|
const api_index = require("../../api/index.js");
|
|
const store_index = require("../../store/index.js");
|
|
const utils_fun = require("../../utils/fun.js");
|
|
if (!Array) {
|
|
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
|
|
const _easycom_wd_picker2 = common_vendor.resolveComponent("wd-picker");
|
|
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
|
(_easycom_wd_navbar2 + _easycom_wd_picker2 + _easycom_z_paging2)();
|
|
}
|
|
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
|
|
const _easycom_wd_picker = () => "../../uni_modules/wot-design-uni/components/wd-picker/wd-picker.js";
|
|
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
|
if (!Math) {
|
|
(_easycom_wd_navbar + _easycom_wd_picker + _easycom_z_paging)();
|
|
}
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
__name: "list",
|
|
setup(__props) {
|
|
const store = store_index.Store();
|
|
const paging = common_vendor.ref(null);
|
|
const dataList = common_vendor.ref([]);
|
|
const columns = common_vendor.ref([]);
|
|
const showLoading = common_vendor.ref(true);
|
|
const typeName = common_vendor.ref("");
|
|
const queryPrams = common_vendor.ref({
|
|
bizType: ""
|
|
});
|
|
common_vendor.computed(
|
|
() => store.userInfo || {
|
|
inviteCode: "",
|
|
nickname: "",
|
|
mobile: "",
|
|
avatar: "",
|
|
paywallet: {
|
|
balance: 0
|
|
}
|
|
}
|
|
);
|
|
const queryList = (pageNo, pageSize) => {
|
|
api_index.api.moneyRecord({ pageNo, pageSize, ...queryPrams.value }).then((res) => {
|
|
columns.value = Object.entries(res.bizType).map(([value, label]) => ({
|
|
value,
|
|
label
|
|
}));
|
|
columns.value.unshift({
|
|
label: "全部",
|
|
value: ""
|
|
});
|
|
paging.value.complete(res.list);
|
|
}).catch((res) => {
|
|
paging.value.complete(false);
|
|
});
|
|
};
|
|
const handleConfirm = (e) => {
|
|
if (!e.value) {
|
|
typeName.value = "";
|
|
} else {
|
|
typeName.value = e.selectedItems.label;
|
|
}
|
|
paging.value.reload();
|
|
};
|
|
const back = () => {
|
|
common_vendor.index.navigateBack();
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_vendor.o(back),
|
|
b: common_vendor.p({
|
|
title: "我的账单",
|
|
bordered: false,
|
|
["left-arrow"]: true,
|
|
["custom-style"]: "background-color: transparent !important;",
|
|
safeAreaInsetTop: true
|
|
}),
|
|
c: common_assets._imports_0$8,
|
|
d: common_vendor.t(typeName.value || "筛选"),
|
|
e: common_assets._imports_1$6,
|
|
f: common_vendor.o(($event) => showLoading.value = true),
|
|
g: common_vendor.o(($event) => showLoading.value = false),
|
|
h: common_vendor.o(handleConfirm),
|
|
i: common_vendor.o(($event) => queryPrams.value.bizType = $event),
|
|
j: common_vendor.p({
|
|
columns: columns.value,
|
|
["use-default-slot"]: true,
|
|
modelValue: queryPrams.value.bizType
|
|
}),
|
|
k: common_vendor.f(dataList.value, (item, index, i0) => {
|
|
return {
|
|
a: common_vendor.t(item.title),
|
|
b: common_vendor.t(common_vendor.unref(utils_fun.timeFormat)(item.createTime, "yyyy-MM-dd hh:mm:ss")),
|
|
c: common_vendor.t(item.money),
|
|
d: index
|
|
};
|
|
}),
|
|
l: common_vendor.sr(paging, "a88fa429-1", {
|
|
"k": "paging"
|
|
}),
|
|
m: common_vendor.o(queryList),
|
|
n: common_vendor.o(($event) => dataList.value = $event),
|
|
o: common_vendor.p({
|
|
["refresher-enabled"]: showLoading.value,
|
|
["use-page-scroll"]: true,
|
|
modelValue: dataList.value
|
|
})
|
|
};
|
|
};
|
|
}
|
|
});
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a88fa429"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/wallet/list.js.map
|