var t = getApp(); Page({ data: { token: t.globalData.token, helpList: [], page: { page: 1, rows: 10, communityId: "" }, haveMore: !0, serviceUrl: t.baseUrls.serviceUrl, baseImgUrl: t.baseUrls.baseImgUrl }, getHelpList: function () { var a = this; t.restAjax.get(t.restAjax.path(t.apis.getHelpList, [t.baseUrls.requestUrl]), a.data.page, { headers: { token: t.globalData.token } }, function (t, o) { for (var s = 0; s < o.rows.length; s++) o.rows[s].photo && (o.rows[s].photo = o.rows[s].photo.split(",")); if (1 == a.data.page.page) a.setData({ helpList: o.rows }); else if (o.rows.length > 0) { for (var n = a.data.helpList, r = 0; r < o.rows.length; r++) n.push(o.rows[r]); a.setData({ helpList: n }); } else wx.showToast({ title: "暂无更多", icon: "none" }), a.setData(e({}, "page.page", a.data.page.page - 1)); o.rows.length < 10 && a.setData({ haveMore: !1 }); }, function (e, t) { console.log(t); }); }, checkHelpDetail: function (e) { var t = e.currentTarget.dataset.id; wx.navigateTo({ url: "./helpDetail?neighborId=" + t }); }, loadMore: function () { this.setData(e({}, "page.page", this.data.page.page + 1)), this.getHelpList(); }, onLoad: function (a) { var o; this.setData((e(o = {}, "page.communityId", a.communityId), e(o, "token", t.globalData.token), o)), this.getHelpList(); }, onReady: function () { }, onShow: function () { }, onHide: function () { }, onUnload: function () { }, onPullDownRefresh: function () { }, onReachBottom: function () { }, onShareAppMessage: function () { } });