const App = getApp(); Page({ /** * 页面的初始数据 */ data: { count:1, goodsInfo:[] }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { this.getSignRecord(); }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 获取签到记录 */ getSignRecord: function (aid) { let _this = this; App._post_form('footchina/getSignRecord', { user_id:wx.getStorageSync('user_id') }, function(result) { _this.setData({ selectedDays: result.data.data }) }); }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { }, /** * 点击日期时候触发的事件 * bind:getdate */ getdate(e) { console.log(e.detail); }, /** * 点击全选触发的事件 * bind:checkall */ checkall(e) { console.log(e.detail.days); }, /** * 点击确定按钮触发的事件 * bind:select */ cmfclick(e){ console.log(e.detail.selectDays); }, /** * 点击清空事件 * bind:clear */ clear(e) { console.log("要清空选中日期") } })