闫增涛
2024-12-23 9f8a5f2ada396ed94f18b6c30a896ceb0da41351
packageCourse/pages/course/detail/index.js
@@ -15,6 +15,7 @@
    startTime: '',
    endTime: '',
    className: '',
    isShow: "",
    count: null,
    classList: [],
    searchKey: '',
@@ -26,6 +27,8 @@
    },
    courseLoading: true,
    classLoading: false,
    showContentOnly: false,
    reason: '',
    // 加载参数
    bottomLoading: false,
    isMoreData: false,
@@ -49,6 +52,24 @@
      title: '基本信息',
    })
    this.getData()
  },
  showDialog(e) {
    const {
      item
    } = e.currentTarget.dataset;
    const str = item.reason ? item.reason : '-'
    this.setData({
      showContentOnly: true,
      reason: str
    });
  },
  closeDialog() {
    this.setData({
      showContentOnly: false
    });
  },
  // 获取课程信息
@@ -159,13 +180,15 @@
  // 打开选择日期
  openDateStart() {
    this.setData({
      visibleStart: true
      visibleStart: true,
      isShow: 'none',
    })
  },
  openDateEnd() {
    this.setData({
      visibleEnd: true
      visibleEnd: true,
      isShow: 'none'
    })
  },
@@ -177,6 +200,7 @@
    const dateStr = moment(value).format('YYYY-MM-DD')
    this.setData({
      startTime: dateStr,
      isShow: ''
    });
  },
@@ -187,6 +211,7 @@
    const dateStr = moment(value).format('YYYY-MM-DD')
    this.setData({
      endTime: dateStr,
      isShow: ''
    });
  },
@@ -253,7 +278,7 @@
        wx.showToast({
          title: '申请开班出错',
          duration: 1000,
          icon: 'err',
          icon: 'none',
        })
        this.setData({
          visible: false
@@ -354,14 +379,17 @@
      classId,
      item
    } = e.currentTarget.dataset
    if (item.applyState == 'WaitAudit' || item.applyState == 'Reject') {
    if (item.applyState == 'WaitAudit') {
      wx.showToast({
        title: item.applyState == 'WaitAudit' ? '审核中' : '未通过',
        title: '审核中',
        duration: 1000,
        icon: 'none',
      })
      return false
    }
    if (item.applyState == 'Reject') {
      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,
    })