no message
This commit is contained in:
84
unpackage/dist/dev/mp-weixin/pages/mine/card.js
vendored
Normal file
84
unpackage/dist/dev/mp-weixin/pages/mine/card.js
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
require("../../uni_modules/uview-plus/index.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
||||
_easycom_z_paging2();
|
||||
}
|
||||
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
||||
if (!Math) {
|
||||
_easycom_z_paging();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "card",
|
||||
setup(__props) {
|
||||
common_vendor.ref({});
|
||||
const paging = common_vendor.ref(null);
|
||||
let dataList = common_vendor.ref([]);
|
||||
let isPagingRefNotFound = () => {
|
||||
return !paging.value;
|
||||
};
|
||||
common_vendor.onPullDownRefresh(() => {
|
||||
if (isPagingRefNotFound())
|
||||
return;
|
||||
paging.value.reload().catch(() => {
|
||||
});
|
||||
});
|
||||
common_vendor.onPageScroll((e2) => {
|
||||
if (isPagingRefNotFound())
|
||||
return;
|
||||
paging.value.updatePageScrollTop(e2.scrollTop);
|
||||
e2.scrollTop < 10 && paging.value.doChatRecordLoadMore();
|
||||
});
|
||||
common_vendor.onReachBottom(() => {
|
||||
if (isPagingRefNotFound())
|
||||
return;
|
||||
paging.value.pageReachBottom();
|
||||
});
|
||||
const queryList = (pageNo, pageSize) => {
|
||||
const params = {
|
||||
current: pageNo,
|
||||
pageSize
|
||||
};
|
||||
api_api.userCardList(params).then((res) => {
|
||||
paging.value.complete(res);
|
||||
}).catch((res) => {
|
||||
paging.value.complete(false);
|
||||
});
|
||||
};
|
||||
let toCrud = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "./cardList?id=" + e.id
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.f(common_vendor.unref(dataList), (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.name),
|
||||
b: common_vendor.t(item.cardNo),
|
||||
c: common_vendor.t(item.stationName),
|
||||
d: common_vendor.t(item.merchantName),
|
||||
e: common_vendor.t(item.balance),
|
||||
f: common_vendor.o(($event) => common_vendor.unref(toCrud)(item), index),
|
||||
g: index
|
||||
};
|
||||
}),
|
||||
b: common_vendor.sr(paging, "dbd3f78b-0", {
|
||||
"k": "paging"
|
||||
}),
|
||||
c: common_vendor.o(queryList),
|
||||
d: common_vendor.o(($event) => common_vendor.isRef(dataList) ? dataList.value = $event : dataList = $event),
|
||||
e: common_vendor.p({
|
||||
["use-page-scroll"]: true,
|
||||
modelValue: common_vendor.unref(dataList)
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-dbd3f78b"]]);
|
||||
_sfc_main.__runtimeHooks = 1;
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine/card.js.map
|
||||
Reference in New Issue
Block a user