// pages/myFollow/myFollow.js const api = require('../../api/index') Page({ /** * 页面的初始数据 */ data: { queryParams:{ current:1, size:10 }, total:0, tableData:[], checkList:[ // { // type:0, // label:'全部', // icon:'', // checked:true // }, { type:1, label:'白名单', icon:'myIconanquanbangzhu', checked:false }, { type:2, label:'灰名单', icon:'myIcongroup43', checked:false }, { type:4, label:'黑名单', icon:'myIconicon-test', checked:false }, ], checked:[] }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { this.setData( { queryParams:{ current:1, size:10 }, total:0 } ) this.getMyFollowProductList() }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady() { }, /** * 生命周期函数--监听页面显示 */ onShow() { }, /** * 页面功能 */ //获取关注的产品 getMyFollowProductList(){}, //加载更多 loadMore(){ var current = this.data.queryParams.current this.setData( { ['queryParams.current']:current+1 } ) this.getMyFollowProductList() }, //获取筛选值 onChange(e){ var data = e.detail this.setData({ checked: data, }); this.getMyFollowProductList() }, /** * 生命周期函数--监听页面隐藏 */ onHide() { }, /** * 生命周期函数--监听页面卸载 */ onUnload() { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh() { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom() { }, /** * 用户点击右上角分享 */ onShareAppMessage() { } })