2024-09-19 07:20:14 +08:00
|
|
|
"use strict";
|
|
|
|
var __async = (__this, __arguments, generator) => {
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
var fulfilled = (value) => {
|
|
|
|
try {
|
|
|
|
step(generator.next(value));
|
|
|
|
} catch (e) {
|
|
|
|
reject(e);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
var rejected = (value) => {
|
|
|
|
try {
|
|
|
|
step(generator.throw(value));
|
|
|
|
} catch (e) {
|
|
|
|
reject(e);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
|
|
});
|
|
|
|
};
|
|
|
|
const common_vendor = require("../../../../common/vendor.js");
|
2024-10-01 09:15:35 +08:00
|
|
|
const modules_mall_sheep_index = require("../../sheep/index.js");
|
|
|
|
const modules_mall_sheep_api_trade_brokerage = require("../../sheep/api/trade/brokerage.js");
|
|
|
|
const modules_mall_sheep_hooks_useGoods = require("../../sheep/hooks/useGoods.js");
|
2024-09-19 07:20:14 +08:00
|
|
|
if (!Array) {
|
|
|
|
const _easycom_uni_load_more2 = common_vendor.resolveComponent("uni-load-more");
|
|
|
|
_easycom_uni_load_more2();
|
|
|
|
}
|
|
|
|
const _easycom_uni_load_more = () => "../../../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js";
|
|
|
|
if (!Math) {
|
|
|
|
_easycom_uni_load_more();
|
|
|
|
}
|
|
|
|
const _sfc_main = {
|
|
|
|
__name: "commission-log",
|
|
|
|
setup(__props) {
|
|
|
|
const state = common_vendor.reactive({
|
|
|
|
loadStatus: "",
|
|
|
|
pagination: {
|
|
|
|
list: [],
|
|
|
|
total: 0,
|
|
|
|
pageNo: 1,
|
|
|
|
pageSize: 1
|
|
|
|
}
|
|
|
|
});
|
|
|
|
function getLog() {
|
|
|
|
return __async(this, null, function* () {
|
|
|
|
state.loadStatus = "loading";
|
2024-10-01 09:15:35 +08:00
|
|
|
const { code, data } = yield modules_mall_sheep_api_trade_brokerage.BrokerageApi.getBrokerageRecordPage({
|
2024-09-19 07:20:14 +08:00
|
|
|
pageNo: state.pagination.pageNo,
|
|
|
|
pageSize: state.pagination.pageSize
|
|
|
|
});
|
|
|
|
if (code !== 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
state.pagination.list = common_vendor.lodash.concat(state.pagination.list, data.list);
|
|
|
|
state.pagination.total = data.total;
|
|
|
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
|
|
|
|
});
|
|
|
|
}
|
|
|
|
getLog();
|
|
|
|
function loadmore() {
|
|
|
|
if (state.loadStatus === "noMore") {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
state.pagination.pageNo++;
|
|
|
|
getLog();
|
|
|
|
}
|
|
|
|
return (_ctx, _cache) => {
|
|
|
|
return common_vendor.e({
|
2024-10-01 09:15:35 +08:00
|
|
|
a: common_vendor.unref(modules_mall_sheep_index.sheep).$url.static("/static/img/shop/commission/title2.png"),
|
2024-09-19 07:20:14 +08:00
|
|
|
b: state.pagination.list
|
|
|
|
}, state.pagination.list ? {
|
|
|
|
c: common_vendor.f(state.pagination.list, (item, k0, i0) => {
|
|
|
|
return {
|
|
|
|
a: common_vendor.t(item.title),
|
2024-10-01 09:15:35 +08:00
|
|
|
b: common_vendor.t(common_vendor.unref(modules_mall_sheep_hooks_useGoods.fen2yuan)(item.price)),
|
2024-09-19 07:20:14 +08:00
|
|
|
c: common_vendor.t(common_vendor.unref(common_vendor.dayjs)(item.createTime).fromNow()),
|
|
|
|
d: item.id
|
|
|
|
};
|
|
|
|
}),
|
2024-10-01 09:15:35 +08:00
|
|
|
d: common_vendor.unref(modules_mall_sheep_index.sheep).$url.static("/static/img/shop/avatar/notice.png")
|
2024-09-19 07:20:14 +08:00
|
|
|
} : {}, {
|
|
|
|
e: state.pagination.total > 0
|
|
|
|
}, state.pagination.total > 0 ? {
|
|
|
|
f: common_vendor.o(loadmore),
|
|
|
|
g: common_vendor.p({
|
|
|
|
status: state.loadStatus,
|
|
|
|
color: "#333333"
|
|
|
|
})
|
|
|
|
} : {}, {
|
|
|
|
h: common_vendor.o(loadmore)
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-59b19f59"]]);
|
|
|
|
wx.createComponent(Component);
|