"use strict";
const common_vendor = require("../../common/vendor.js");
const components_request = require("../request.js");
const components_formatDate = require("../formatDate.js");
const common_assets = require("../../common/assets.js");
const _sfc_main = {
  inject: ["$global"],
  data() {
    return {
      page: 0,
      //页码
      size: 10,
      //每页条数
      list: []
      // 列表数据
    };
  },
  mounted() {
    this.pkList();
  },
  methods: {
    onRefresherRefresh() {
      this.page = 0;
      this.list = [];
      this.pkList();
    },
    goDetail(item) {
      common_vendor.index.navigateTo({
        url: "/pages/pkDetail/pkDetail",
        success: function(res) {
          res.eventChannel.emit("itemDetail", {
            item
          });
        }
      });
    },
    formatDate: components_formatDate.formatDate,
    async pkList() {
      const res = await components_request.request({
        url: "pk/pkList",
        method: "GET",
        data: {
          status: 0,
          page: this.page,
          size: this.size
        },
        userInfo: false
      });
      common_vendor.index.__f__("log", "at components/contentList/contentList.vue:71", res);
      if (res.code === 200) {
        this.list.push(...res.data);
        common_vendor.index.__f__("log", "at components/contentList/contentList.vue:74", this.list);
      }
    },
    onScrollToLower() {
      this.page++;
      this.pkList();
    }
  }
};
if (!Array) {
  const _component_uni_card = common_vendor.resolveComponent("uni-card");
  _component_uni_card();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  return {
    a: common_vendor.f($data.list, (item, index, i0) => {
      return common_vendor.e({
        a: item.anchorIcon,
        b: common_vendor.t(item.anchorId),
        c: item.sex === "2"
      }, item.sex === "2" ? {
        d: common_assets._imports_0$4
      } : {
        e: common_assets._imports_1$1
      }, {
        f: common_vendor.t(item.sex === "1" ? "男" : "女"),
        g: item.sex === "1" ? 1 : "",
        h: item.sex === "2" ? 1 : "",
        i: common_vendor.t($options.formatDate(item.pkTime)),
        j: common_vendor.t(item.coin + "K"),
        k: common_vendor.o$1(($event) => $options.goDetail(item)),
        l: "4813d59a-0-" + i0
      });
    }),
    b: common_vendor.o$1((...args) => $options.onRefresherRefresh && $options.onRefresherRefresh(...args)),
    c: common_vendor.o$1((...args) => $options.onScrollToLower && $options.onScrollToLower(...args))
  };
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-4813d59a"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/contentList/contentList.js.map
