111
QYF-GitLab1
2024-12-23 a2b6203372280be42530c6eaee2bffb6cf3c74d3
packageCourse/pages/course/detail/index.js
@@ -15,6 +15,7 @@
    startTime: '',
    endTime: '',
    className: '',
    isShow: "",
    count: null,
    classList: [],
    searchKey: '',
@@ -179,13 +180,15 @@
  // 打开选择日期
  openDateStart() {
    this.setData({
      visibleStart: true
      visibleStart: true,
      isShow: 'none',
    })
  },
  openDateEnd() {
    this.setData({
      visibleEnd: true
      visibleEnd: true,
      isShow: 'none'
    })
  },
@@ -197,6 +200,7 @@
    const dateStr = moment(value).format('YYYY-MM-DD')
    this.setData({
      startTime: dateStr,
      isShow: ''
    });
  },
@@ -207,6 +211,7 @@
    const dateStr = moment(value).format('YYYY-MM-DD')
    this.setData({
      endTime: dateStr,
      isShow: ''
    });
  },
@@ -219,6 +224,8 @@
  // 申请提交班级
  submitClass() {
    const bTime = moment(this.data.startTime).valueOf()
    const eTime = moment(this.data.endTime).valueOf()
    if (!this.data.className) {
      wx.showToast({
        title: '请填写课程名称',
@@ -238,6 +245,14 @@
    if (!this.data.startTime || !this.data.endTime) {
      wx.showToast({
        title: '请选择班级有效期',
        duration: 1000,
        icon: 'none',
      })
      return false
    }
    if (bTime && eTime && eTime < bTime) {
      wx.showToast({
        title: '请选择班正确的班级有效期',
        duration: 1000,
        icon: 'none',
      })
@@ -273,7 +288,7 @@
        wx.showToast({
          title: '申请开班出错',
          duration: 1000,
          icon: 'err',
          icon: 'none',
        })
        this.setData({
          visible: false