QYF-GitLab1
2024-12-18 8c2b523a1b1891e0557f04a50bf899abf96fe286
packageCourse/pages/course/index.js
@@ -31,6 +31,7 @@
      total: 999,
      loading: false
    },
    submitLoading: false,
    // 加载参数
    bottomLoading: false,
    isMoreData: false,
@@ -114,7 +115,7 @@
            ...item,
            name: item.name,
            id: item.id,
            icon: item.icon && item.icon != 'default' ? getPublicImage(item.icon, 80) : '',
            icon: item.icon && item.icon != 'default' ? getPublicImage(item.icon, 200) : '',
            introduction: item.description,
            reason: item.applyReturnMsg ? JSON.parse(item.applyReturnMsg).reason : '-'
          }
@@ -162,7 +163,7 @@
        const list = res.datas.map((item) => {
          return {
            ...item,
            icon: item.product.icon ? getPublicImage(item.product.icon, 80) : ''
            icon: item.product.icon ? getPublicImage(item.product.icon, 200) : ''
          }
        })
        this.setData({
@@ -209,8 +210,11 @@
  // 单选选择课本
  onChange(e) {
    const {
      index
    } = e.currentTarget.dataset
    this.setData({
      radioVal: e.detail.value
      radioVal: index
    });
  },
@@ -256,6 +260,9 @@
      })
      return false
    }
    this.setData({
      submitLoading: true
    })
    app.MG.edu
      .applyNewCourse({
        name: this.data.courseName,
@@ -275,7 +282,11 @@
      .then((res) => {
        if (res) {
          this.setData({
            visible: false
            visible: false,
            selectedBook: null,
            courseDesc: '',
            courseName: '',
            submitLoading: false
          })
          this.getData()
        }