
var app = getApp()
var api = require('../../utils/api.js');

Page({
  data: {
    courseInfo: null,
    is_new: true
  },
  onLoad: function () {
    let pt_student = wx.getStorageSync('pt_student')
    wx.request({
      url: api.getCourseInfoUrl,
      method: 'GET',
      data: {
        'student_id': pt_student.id
      },
      success: res => {
        if (res.data.status == 'success') {
          this.setData({
            courseInfo: res.data.courseInfo,
            is_new: res.data.is_new
          })
        }
      }
    })
  }
})
