const tools = require('../../utils/tools.js');
const app = require('../../utils/util.js');
Page({
  data: {
    dataArr: []
  },
  getList(sessionKey) {
    wx.request({
      url: app.globalData.publicUrl + '/wx/student/selClasToo',
      method: "post",
      data: {
        sessionKey,
        isActive: "2"
      },
      success: (res) => {
        this.setData({
          dataArr: res.data.data
        })
      }
    })
  },
  async onLoad() {
    const sessionKey = await tools.checkSessionAndLogin();
    this.getList(sessionKey);
  }
})