"use strict";
const common_vendor = require("../../../common/vendor.js");
const sheep_index = require("../../../sheep/index.js");
const sheep_api_trade_brokerage = require("../../../sheep/api/trade/brokerage.js");
const sheep_hooks_useGoods = require("../../../sheep/hooks/useGoods.js");
require("../../../sheep/api/index.js");
require("../../../sheep/api/distri/score.js");
require("../../../sheep/request/index.js");
require("../../../sheep/config/index.js");
require("../../../sheep/store/index.js");
require("../../../sheep/store/app.js");
require("../../../sheep/api/promotion/diy.js");
require("../../../sheep/platform/index.js");
require("../../../sheep/platform/provider/wechat/index.js");
require("../../../sheep/platform/provider/wechat/miniProgram.js");
require("../../../sheep/api/member/auth.js");
require("../../../sheep/api/member/social.js");
require("../../../sheep/api/member/user.js");
require("../../../sheep/platform/provider/apple/index.js");
require("../../../sheep/platform/share.js");
require("../../../sheep/router/index.js");
require("../../../sheep/hooks/useModal.js");
require("../../../sheep/helper/index.js");
require("../../../sheep/helper/test.js");
require("../../../sheep/helper/digit.js");
require("../../../sheep/api/member/signin.js");
require("../../../sheep/helper/throttle.js");
require("../../../sheep/url/index.js");
require("../../../sheep/platform/pay.js");
require("../../../sheep/api/pay/order.js");
require("../../../sheep/store/user.js");
require("../../../sheep/store/cart.js");
require("../../../sheep/api/trade/cart.js");
require("../../../sheep/api/pay/wallet.js");
require("../../../sheep/api/trade/order.js");
require("../../../sheep/api/promotion/coupon.js");
require("../../../sheep/store/sys.js");
require("../../../sheep/store/modal.js");
require("../../../sheep/api/distri/share.js");
require("../../../sheep/api/distri/team.js");
require("../../../sheep/api/infra/file.js");
require("../../../sheep/api/member/address.js");
require("../../../sheep/api/member/point.js");
require("../../../sheep/api/migration/app.js");
require("../../../sheep/api/migration/chat.js");
require("../../../sheep/api/migration/index.js");
require("../../../sheep/api/migration/third.js");
require("../../../sheep/api/pay/channel.js");
require("../../../sheep/api/product/category.js");
require("../../../sheep/api/product/comment.js");
require("../../../sheep/api/product/favorite.js");
require("../../../sheep/api/product/history.js");
require("../../../sheep/api/product/spu.js");
require("../../../sheep/api/promotion/activity.js");
require("../../../sheep/api/promotion/article.js");
require("../../../sheep/api/promotion/bargain.js");
require("../../../sheep/api/promotion/combination.js");
require("../../../sheep/api/promotion/rewardActivity.js");
require("../../../sheep/api/promotion/seckill.js");
require("../../../sheep/api/system/area.js");
require("../../../sheep/api/system/voice.js");
require("../../../sheep/api/trade/afterSale.js");
require("../../../sheep/api/trade/config.js");
require("../../../sheep/api/trade/delivery.js");
require("../../../sheep/config/zIndex.js");
require("../../../sheep/util/index.js");
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
      }
    });
    async function getLog() {
      state.loadStatus = "loading";
      const { code, data } = await sheep_api_trade_brokerage.BrokerageApi.getBrokerageRecordPage({
        pageNo: state.pagination.pageNo,
        pageSize: state.pagination.pageSize
      });
      if (code !== 0) {
        return;
      }
      state.pagination.list = common_vendor._.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({
        a: common_vendor.unref(sheep_index.sheep).$url.static("/static/images/title2.png"),
        b: state.pagination.list
      }, state.pagination.list ? {
        c: common_vendor.f(state.pagination.list, (item, k0, i0) => {
          return {
            a: common_vendor.t(item.title),
            b: common_vendor.t(common_vendor.unref(sheep_hooks_useGoods.fen2yuan)(item.price)),
            c: common_vendor.t(common_vendor.unref(common_vendor.dayjs)(item.createTime).fromNow()),
            d: item.id
          };
        }),
        d: common_vendor.unref(sheep_index.sheep).$url.static("/static/images/notice.png")
      } : {}, {
        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-8c54e688"], ["__file", "D:/zx/mall-front-app/pages/commission/components/commission-log.vue"]]);
wx.createComponent(Component);
