"use strict"; const common_vendor = require("../../common/vendor.js"); require("../../uni_modules/uview-plus/index.js"); const api_api = require("../../api/api.js"); const money = require("../../money.js"); const hooks_useNav = require("../../hooks/useNav.js"); const uni_modules_uviewPlus_libs_function_index = require("../../uni_modules/uview-plus/libs/function/index.js"); if (!Array) { const _easycom_uni_section2 = common_vendor.resolveComponent("uni-section"); const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging"); (_easycom_uni_section2 + _easycom_z_paging2)(); } const _easycom_uni_section = () => "../../uni_modules/uni-section/components/uni-section/uni-section.js"; const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js"; if (!Math) { (_easycom_uni_section + _easycom_z_paging)(); } const _sfc_main = { __name: "wallet", setup(__props) { const { nav, navTo } = hooks_useNav.useNav(); let getInfo = common_vendor.ref({}); const paging = common_vendor.ref(null); let dataList = common_vendor.ref([]); let num = common_vendor.ref(1); let isPagingRefNotFound = () => { return !paging.value; }; common_vendor.onShow(async () => { let _res = await api_api.userInfo(); getInfo.value = _res; if (num.value != 1) { paging.value.reload(); } num.value++; }); common_vendor.onPullDownRefresh(() => { if (isPagingRefNotFound()) return; paging.value.reload().catch(() => { }); }); common_vendor.onPageScroll((e) => { if (isPagingRefNotFound()) return; paging.value.updatePageScrollTop(e.scrollTop); e.scrollTop < 10 && paging.value.doChatRecordLoadMore(); }); common_vendor.onReachBottom(() => { if (isPagingRefNotFound()) return; paging.value.pageReachBottom(); }); const queryList = (pageNo, pageSize) => { console.log(money.moneyJson); const params = { current: pageNo, pageSize }; api_api.getUsersPoint2Info(params).then((res) => { paging.value.complete(res.records); }).catch((res) => { paging.value.complete(false); }); }; return (_ctx, _cache) => { return { a: common_vendor.t(common_vendor.unref(getInfo).points2 || "0.00"), b: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/mine/topUp`, true)), c: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/mine/transferBalance`, true)), d: common_vendor.p({ title: "明细", type: "line", titleFontSize: "32rpx" }), e: common_vendor.f(common_vendor.unref(dataList), (item, index, i0) => { return { a: common_vendor.t(common_vendor.unref(money.moneyJson).find((val) => val.id == item.type).name), b: common_vendor.t(common_vendor.unref(uni_modules_uviewPlus_libs_function_index.timeFormat)(new Date(item.createTime).getTime(), "yyyy-mm-dd hh:MM")), c: common_vendor.t(item.points), d: index }; }), f: () => ({ r: paging, k: "paging" }), g: common_vendor.o(queryList), h: common_vendor.o(($event) => common_vendor.isRef(dataList) ? dataList.value = $event : dataList = $event), i: common_vendor.p({ ["use-page-scroll"]: true, modelValue: common_vendor.unref(dataList) }) }; }; } }; const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-4c380209"]]); _sfc_main.__runtimeHooks = 1; my.createPage(MiniProgramPage);