first commit
This commit is contained in:
117
unpackage/dist/dev/mp-alipay/pages/mine/earnings.js
vendored
Normal file
117
unpackage/dist/dev/mp-alipay/pages/mine/earnings.js
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
require("../../uni_modules/uview-plus/index.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
const hooks_useNav = require("../../hooks/useNav.js");
|
||||
const money = require("../../money.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../uni_modules/uview-plus/libs/function/index.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_grid_item2 = common_vendor.resolveComponent("up-grid-item");
|
||||
const _easycom_up_grid2 = common_vendor.resolveComponent("up-grid");
|
||||
const _easycom_uni_section2 = common_vendor.resolveComponent("uni-section");
|
||||
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
||||
(_easycom_up_grid_item2 + _easycom_up_grid2 + _easycom_uni_section2 + _easycom_z_paging2)();
|
||||
}
|
||||
const _easycom_up_grid_item = () => "../../uni_modules/uview-plus/components/u-grid-item/u-grid-item.js";
|
||||
const _easycom_up_grid = () => "../../uni_modules/uview-plus/components/u-grid/u-grid.js";
|
||||
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_up_grid_item + _easycom_up_grid + _easycom_uni_section + _easycom_z_paging)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "earnings",
|
||||
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);
|
||||
common_vendor.onShow(async () => {
|
||||
let _res = await api_api.userInfo();
|
||||
getInfo.value = _res;
|
||||
if (num.value != 1) {
|
||||
paging.value.reload();
|
||||
}
|
||||
num.value++;
|
||||
});
|
||||
let isPagingRefNotFound = () => {
|
||||
return !paging.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) => {
|
||||
let { id } = common_vendor.index.getStorageSync("user");
|
||||
const params = {
|
||||
current: pageNo,
|
||||
pageSize,
|
||||
userId: id
|
||||
};
|
||||
api_api.getUsersPoint1Info(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).points1 || "0.00"),
|
||||
b: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/mine/transferBalance`, true)),
|
||||
c: common_assets._imports_0$3,
|
||||
d: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/wallet/incomeList`, true)),
|
||||
e: common_assets._imports_2,
|
||||
f: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/wallet/withdrawList`, true)),
|
||||
g: common_assets._imports_2$1,
|
||||
h: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/wallet/withdraw`, true)),
|
||||
i: common_assets._imports_3,
|
||||
j: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/wallet/bankCard`, true)),
|
||||
k: common_vendor.p({
|
||||
border: false,
|
||||
col: "4"
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
title: "最新记录",
|
||||
type: "line",
|
||||
titleFontSize: "32rpx"
|
||||
}),
|
||||
m: 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
|
||||
};
|
||||
}),
|
||||
n: () => ({
|
||||
r: paging,
|
||||
k: "paging"
|
||||
}),
|
||||
o: common_vendor.o(queryList),
|
||||
p: common_vendor.o(($event) => common_vendor.isRef(dataList) ? dataList.value = $event : dataList = $event),
|
||||
q: common_vendor.p({
|
||||
["use-page-scroll"]: true,
|
||||
modelValue: common_vendor.unref(dataList)
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-77725727"]]);
|
||||
_sfc_main.__runtimeHooks = 1;
|
||||
my.createPage(MiniProgramPage);
|
||||
Reference in New Issue
Block a user