11
QYF-GitLab1
2025-01-08 67a890445ceac9785ee62877b1e656fa4aeb0d5e
11
7个文件已修改
126 ■■■■■ 已修改文件
packageCourse/components/baseClass/index.wxml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/components/baseClass/index.wxss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/components/teaching/index.js 101 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/course/detail/index.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/course/detail/index.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/teachClass/detail/index.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/teachClass/detail/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/components/baseClass/index.wxml
@@ -43,7 +43,9 @@
  <view class="pubCss">
    <view class="title">班级通知</view>
    <view class="notice" wx:if="{{noticeList.length > 0}}">
      <view class="notice-title" wx:for="{{noticeList}}" wx:key="index">{{item.name}}</view>
      <view class="notice-title" wx:for="{{noticeList}}" wx:key="index">
        <view class="notice-content">{{item.name}}:{{item.content}}</view>
      </view>
    </view>
    <view class="noData" wx:else>
      <empty />
packageCourse/components/baseClass/index.wxss
@@ -101,6 +101,10 @@
  font-size: 26rpx;
}
.notice-content {
  line-height: 48rpx;
}
.noData {
  display: flex;
  justify-content: center;
packageCourse/components/teaching/index.js
@@ -96,56 +96,63 @@
                cmsPath: data.productLinkPath
              })
              .then((res) => {
                const dataTeach = res.datas.cmsDatas[0]?.datas.find(
                  (item) => item.refCode == 'jsek_interaction'
                )
                app.MG.store
                  .getProductDetail({
                    path: '*',
                    queryType: '*',
                    productId: this.properties.bookId,
                    cmsPath: dataTeach.productLinkPath
                  })
                  .then((res) => {
                    let datas = res.datas.cmsDatas[0] ? res.datas.cmsDatas[0].datas : []
                    const dataRes = []
                    if (datas?.length > 0) {
                      datas.forEach(async (item) => {
                        const cmsRes = await app.MG.store
                          .getProductDetail({
                            path: '*',
                            queryType: '*',
                            productId: this.properties.bookId,
                            cmsPath: item.productLinkPath
                try {
                  const dataTeach = res.datas.cmsDatas[0]?.datas.find(
                    (item) => item.refCode == 'jsek_interaction'
                  )
                  app.MG.store
                    .getProductDetail({
                      path: '*',
                      queryType: '*',
                      productId: this.properties.bookId,
                      cmsPath: dataTeach.productLinkPath
                    })
                    .then((res) => {
                      let datas = res.datas.cmsDatas[0] ? res.datas.cmsDatas[0].datas : []
                      const dataRes = []
                      if (datas?.length > 0) {
                        datas.forEach(async (item) => {
                          const cmsRes = await app.MG.store
                            .getProductDetail({
                              path: '*',
                              queryType: '*',
                              productId: this.properties.bookId,
                              cmsPath: item.productLinkPath
                            })
                          if (
                            cmsRes.datas.cmsDatas[0].datas &&
                            cmsRes.datas.cmsDatas[0].datas.length > 0
                          ) {
                            cmsRes.datas.cmsDatas[0].datas.forEach((item, i) => {
                              item.subList = []
                              item.updateDate = '-'
                              if (this.data.dataList.length > 0) {
                                this.data.dataList.forEach((mitem) => {
                                  if (mitem.name == item.name) {
                                    item.updateDate = moment(mitem.updateDate).format(
                                      'YYYY-MM-DD HH:mm:ss'
                                    )
                                    item.subList.push(mitem)
                                  }
                                })
                              }
                              dataRes.push(item)
                            })
                          }
                          const resList = dataRes.sort((a, b) => b.subList.length - a.subList.length)
                          this.setData({
                            cmsDataList: resList,
                            loading: false
                          })
                        if (
                          cmsRes.datas.cmsDatas[0].datas &&
                          cmsRes.datas.cmsDatas[0].datas.length > 0
                        ) {
                          cmsRes.datas.cmsDatas[0].datas.forEach((item, i) => {
                            item.subList = []
                            item.updateDate = '-'
                            if (this.data.dataList.length > 0) {
                              this.data.dataList.forEach((mitem) => {
                                if (mitem.name == item.name) {
                                  item.updateDate = moment(mitem.updateDate).format(
                                    'YYYY-MM-DD HH:mm:ss'
                                  )
                                  item.subList.push(mitem)
                                }
                              })
                            }
                            dataRes.push(item)
                          })
                        }
                        const resList = dataRes.sort((a, b) => b.subList.length - a.subList.length)
                        this.setData({
                          cmsDataList: resList,
                          loading: false
                        })
                      })
                    }
                      }
                    })
                } catch (error) {
                  this.setData({
                    cmsDataList: [],
                    loading: false
                  })
                }
              })
          } catch (error) {
            this.setData({
packageCourse/pages/course/detail/index.js
@@ -222,6 +222,14 @@
    })
  },
  calendarClose() {
    this.setData({
      visibleStart: false,
      visibleEnd: false,
      isShow: ''
    })
  },
  // 申请提交班级
  submitClass() {
    const bTime = moment(this.data.startTime).valueOf()
packageCourse/pages/course/detail/index.wxml
@@ -113,12 +113,12 @@
              <view class="dateBox">
                <view>
                  <t-input style="display:{{isShow}}" value="{{startTime}}" readonly borderless bindtap="openDateStart" placeholder="请选择开始时间" />
                  <t-calendar visible="{{visibleStart}}" bind:confirm="handleConfirmStart" />
                  <t-calendar visible="{{visibleStart}}" bind:confirm="handleConfirmStart" bind:close="calendarClose"/>
                </view>
                <view>~</view>
                <view>
                  <t-input value="{{endTime}}" style="display:{{isShow}}" readonly borderless bindtap="openDateEnd" placeholder="请选择结束时间" />
                  <t-calendar visible="{{visibleEnd}}" bind:confirm="handleConfirmEnd" />
                  <t-calendar visible="{{visibleEnd}}" bind:confirm="handleConfirmEnd" bind:close="calendarClose"/>
                </view>
              </view>
            </view>
packageCourse/pages/teachClass/detail/index.js
@@ -244,6 +244,9 @@
        }
      }
      item.questionTypeList = item.questionTypeList.filter((item) => item.data.length > 0)
      if (!item.userName) {
        item.userName = '-'
      }
      newData.push(item)
    }
    return newData.filter((item) => item.questionTypeList.length > 0)
packageCourse/pages/teachClass/detail/index.wxml
@@ -34,7 +34,7 @@
    </view>
    <view class="block-question">
      <view class="block-question-list" wx:for="{{dialogList}}" wx:key="index">
        <view class="block-question-user">答题人:{{ item.userNme }}</view>
        <view class="block-question-user">答题人:{{ item.userName }}</view>
        <questionDom wx:if="{{item.questionTypeList.length > 0}}" questionList="{{item.questionTypeList}}" noCheckbox="{{false}}" is-preview="{{true}}" />
      </view>
    </view>