city_card/pages/neighbor/circle/circleList.js
2023-07-15 14:25:28 +08:00

47 lines
1.3 KiB
JavaScript

var t = getApp();
Page({
data: {
token: t.globalData.token,
circleList: [],
page: {
page: 1,
rows: 10
},
serviceUrl: t.baseUrls.serviceUrl,
baseImgUrl: t.baseUrls.baseImgUrl
},
checkDetail: function(t) {
var e = t.currentTarget.dataset.id;
wx.navigateTo({
url: "./circleDetail?neighborCircleId=" + e
});
},
getCircleList: function() {
var e = this;
t.restAjax.get(t.restAjax.path(t.apis.getCircleList, [ t.baseUrls.requestUrl ]), e.data.page, {
headers: {
token: t.globalData.token
}
}, function(t, o) {
for (var a = 0; a < o.rows.length; a++) o.rows[a].photo && (o.rows[a].photo = o.rows[a].photo.split(","));
e.setData({
circleList: o.rows
});
}, function(t, e) {
console.log(e);
});
},
onLoad: function(e) {
this.setData({
token: t.globalData.token
}), this.getCircleList();
},
onReady: function() {},
onShow: function() {},
onHide: function() {},
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {},
onShareAppMessage: function() {}
});