|
|
|
// subpages/associationNew/pages/eventlist/eventlist.js
|
|
|
|
import { topiclist} from '../../utils/api'
|
|
|
|
import {
|
|
|
|
getTimestamp
|
|
|
|
} from '../../../../utils/common'
|
|
|
|
Page({
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面的初始数据
|
|
|
|
*/
|
|
|
|
data: {
|
|
|
|
images:[
|
|
|
|
"https://epdc-shibei.elinkservice.cn/epdcFile/M00/00/00/CgUipV3wgl6Afm4cAAAa8QfEb00266_big.png",
|
|
|
|
"https://epdc-shibei.elinkservice.cn/epdcFile/M00/00/00/CgUipV3wgl6Afm4cAAAa8QfEb00266_big.png",
|
|
|
|
"https://epdc-shibei.elinkservice.cn/epdcFile/M00/00/00/CgUipV3wgl6Afm4cAAAa8QfEb00266_big.png"
|
|
|
|
],
|
|
|
|
topiclist:[],
|
|
|
|
timestamp: getTimestamp(),
|
|
|
|
pageIndex: 1,
|
|
|
|
pageSize: 10,
|
|
|
|
partyGroupId:'',//党群id
|
|
|
|
topicType:'',//0:事好儿鼓个掌 1:话对捧个场
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
|
|
onLoad: function (options) {
|
|
|
|
this.setData({
|
|
|
|
partyGroupId:options.partyGroupId,
|
|
|
|
topicType:options.topicType,//0:事好儿鼓个掌 1:话对捧个场
|
|
|
|
})
|
|
|
|
this.topiclist()
|
|
|
|
},
|
|
|
|
|
|
|
|
topiclist(){
|
|
|
|
const para = {
|
|
|
|
pageIndex: this.data.pageIndex,
|
|
|
|
pageSize: this.data.pageSize,
|
|
|
|
timestamp: this.data.timestamp,
|
|
|
|
topicType:this.data.topicType,
|
|
|
|
partyGroupId: this.data.partyGroupId, //党群id
|
|
|
|
}
|
|
|
|
topiclist(para).then(res => {
|
|
|
|
let that = this;
|
|
|
|
console.log(JSON.stringify(res))
|
|
|
|
this.setData({
|
|
|
|
topiclist: that.data.topiclist.concat(res.data),
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
|
*/
|
|
|
|
onReady: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
*/
|
|
|
|
onShow: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
|
*/
|
|
|
|
onHide: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面卸载
|
|
|
|
*/
|
|
|
|
onUnload: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
|
*/
|
|
|
|
onPullDownRefresh: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
|
*/
|
|
|
|
onReachBottom: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 用户点击右上角分享
|
|
|
|
*/
|
|
|
|
onShareAppMessage: function () {
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|