"use strict";
const common_vendor = require("../../common/vendor.js");
const components_request = require("../../components/request.js");
const tabBar = () => "../../components/tabBar/tabBar.js";
const _sfc_main = {
  data() {
    return {
      list: [],
      triggered: false,
      page: 0,
      pageSize: 10
    };
  },
  onShareAppMessage(res) {
    if (res.from === "menu") {
      return {
        title: "分享",
        path: getCurrentPages()[getCurrentPages().length - 1].route
      };
    }
  },
  onLoad() {
    this.getlist();
  },
  methods: {
    //获取列表数据
    getlist() {
      components_request.request({
        url: "systemMessage/list",
        data: {
          page: this.page,
          size: this.pageSize
        },
        method: "POST"
      }).then((res) => {
        this.triggered = false;
        common_vendor.index.__f__("log", "at pages/Forum/Forum.vue:79", res);
        if (res.code === 200) {
          this.list.push(...res.data);
        }
      });
    },
    //下拉刷新
    onRefresherRefresh() {
      common_vendor.index.__f__("log", "at pages/Forum/Forum.vue:88", "下拉刷新");
      this.triggered = true;
      this.list = [];
      this.page = 0;
      this.getlist();
    },
    //上拉加载
    onScrollToLower() {
      this.page++;
      this.getlist();
    }
  },
  components: {
    tabBar
  }
};
if (!Array) {
  const _easycom_tabBar2 = common_vendor.resolveComponent("tabBar");
  _easycom_tabBar2();
}
const _easycom_tabBar = () => "../../components/tabBar/tabBar.js";
if (!Math) {
  _easycom_tabBar();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  return {
    a: common_vendor.f($data.list, (item, index, i0) => {
      return {
        a: common_vendor.t(item.title),
        b: common_vendor.t(item.content),
        c: common_vendor.t(item.time),
        d: index
      };
    }),
    b: common_vendor.o((...args) => $options.onRefresherRefresh && $options.onRefresherRefresh(...args)),
    c: common_vendor.o((...args) => $options.onScrollToLower && $options.onScrollToLower(...args)),
    d: $data.triggered,
    e: common_vendor.p({
      tabIndex: 1
    })
  };
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-21360a99"]]);
_sfc_main.__runtimeHooks = 2;
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/Forum/Forum.js.map
