litian
2025-03-17 5b19b0e39a91e566a835460bf1213e7b3a0582b9
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: ''
    });
  },
@@ -217,8 +222,18 @@
    })
  },
  calendarClose() {
    this.setData({
      visibleStart: false,
      visibleEnd: false,
      isShow: ''
    })
  },
  // 申请提交班级
  submitClass() {
    const bTime = moment(this.data.startTime).valueOf()
    const eTime = moment(this.data.endTime).valueOf()
    if (!this.data.className) {
      wx.showToast({
        title: '请填写课程名称',
@@ -238,6 +253,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 +296,7 @@
        wx.showToast({
          title: '申请开班出错',
          duration: 1000,
          icon: 'err',
          icon: 'none',
        })
        this.setData({
          visible: false
@@ -386,7 +409,7 @@
      return false
    }
    wx.navigateTo({
      url: '/packageCourse/pages/teachClass/index?classId=' + classId + '&courseId=' + this.data.courseId + '&author=' + this.data.bookData.author + '&isbn=' + this.data.bookData.isbn + '&bookId=' + this.data.bookData.id + '&rootCmsItemId=' + this.data.bookData.rootCmsItemId + "&bookRefCode=" + this.data.defaultCmsPath,
      url: '/packageCourse/pages/teachClass/index?classId=' + classId + '&courseId=' + this.data.courseId + '&author=' + this.data.bookData.author + '&isbn=' + this.data.bookData.isbn + '&bookId=' + this.data.bookData.id + '&rootCmsItemId=' + this.data.bookData.rootCmsItemId + "&bookRefCode=" + item.linkProductDto.product.refCode,
    })
  },