var t = function(t) { return t && t.__esModule ? t : { default: t }; }(require("../../../utils/LoadMore.js")), e = getApp(), a = new t.default(), i = require("../../../utils/util.js"); Page({ data: { url: e.globalData.setting.url, resourceUrl: e.globalData.setting.resourceUrl, categories: [ { name: "全部", type: "all" }, { name: "赚取", type: "plus" }, { name: "消费", type: "minus" } ], activeType: "all", points: null, currentPage: 1 }, onLoad: function(t) { var e = void 0 === t.type ? this.data.activeType : t.type; a.init(this, "", "points"), this.requestPointList(e); }, changeTab: function(t) { a.resetConfig(), this.data.points = null, this.data.currentPage = 1, this.requestPointList(t.currentTarget.id); }, requestPointList: function(t) { var e = this, n = "/api/user/points_list/type/" + t + "?p=" + e.data.currentPage; this.setData({ activeType: t }), a.request(n, function(t) { e.data.currentPage++, t.data.result.forEach(function(t, e, a) { t.changeTimeFommat = i.format(t.change_time, "yyyy-MM-dd hh:mm"); }), wx.stopPullDownRefresh(); }); }, onReachBottom: function() { a.canloadMore() && this.requestPointList(this.data.activeType); }, onPullDownRefresh: function(t) { this.data.points = null, this.data.currentPage = 1, a.resetConfig(), this.requestPointList(this.data.activeType); } });