Page({

  /**
   * 页面的初始数据
   */
  data: {
      isOpen: false,
      daysColor: [
          {
              month: 'current',
              day: '12',
              color: '#fff',
              background: 'linear-gradient(#5791FE 0%, #3E63F8 100%);'
          },
          {
              month: 'current',
              day: '10',
              color: '#fff',
              background: 'linear-gradient(#5791FE 0%, #3E63F8 100%);'
          },
          {
              month: 'current',
              day: '8',
              color: '#fff',
              background: 'linear-gradient(#5791FE 0%, #3E63F8 100%);'
          }
      ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },
  onChange(e) {
      let index = e.currentTarget.dataset.index
      let list = this.data.classlist
      list[index].timeData = e.detail
      this.setData({
          classlist: list
      })
  },
  changeTab(e) {
      let index = e.currentTarget.dataset.index
      if (this.data.activeIndex != index) {
          this.setData({
              activeIndex: index
          })
      }
  },
  // 日历展开与否
  open() {
    this.setData({
        isOpen: !this.data.isOpen
    })
    },
    goclassManagement:function(){
        wx.navigateTo({
          url: '../../index/classManagement/classManagement',
        })
    },
    goclassDetail:function(){
        wx.navigateTo({
          url: '../../index/classDetail/classDetail',
        })
    }
})