zhongshujie
2024-12-20 32986b54a0e2661f7ad6ed79f3ef12c4289eace9
Merge refs/remotes/origin/master into refs/heads/master
20个文件已修改
384 ■■■■■ 已修改文件
assets/js/middleGround/api/edu.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/testResource/testResource.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/examination.js 167 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/examination.wxml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionOptions/index.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionOptions/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/components/studentManage/index.wxss 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/components/teaching/index.js 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/course/detail/index.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/course/detail/index.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/course/detail/index.wxml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/course/detail/index.wxss 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/course/index.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/course/index.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/course/index.wxml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/course/index.wxss 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/studentClass/index.wxml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/teachClass/detail/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/teachClass/index.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
assets/js/middleGround/api/edu.js
@@ -188,6 +188,14 @@
      data
    })
  },
  // 获取加入的班级列表
  getJoinCourseClassList(data) {
    return request({
      url: '/edu/api/ApiGetJoinCourseClassList',
      method: 'post',
      data
    })
  },
}
export default eduApi
packageBookService/pages/bookServices/detail/components/testResource/testResource.wxml
@@ -113,7 +113,7 @@
        data-answerType="errorQuestion"
      >
        <view slot="content" class="btn-content">
          <image src="/static/images/bookService/detail/yijiangoumai.png" />
          <image src="/static/images/bookService/detail/cart.png" />
          <text class="primary-color">加入购物车</text>
        </view>
      </t-button>
packageBookService/pages/bookServices/examination/examination.js
@@ -91,7 +91,6 @@
    }
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
@@ -103,7 +102,6 @@
    } else {
      this.init()
    }
  },
  /**
@@ -761,6 +759,14 @@
        }, ],
      });
      this.init();
    } else if (this.data.answerType == 'interaction') {
      this.setData({
        countdownTime: 2 * 60 * 60 * 1000,
      });
      this.delinteractionInfo(() => {
        this.getQuestionList()
        this.clearTime();
      })
    } else {
      this.init();
      this.clearTime();
@@ -1080,9 +1086,6 @@
            questionDataList: questionList,
            cardList: cardUpdatedList,
          });
          console.log(
            '题目', this.data.questionDataList
          );
        });
      });
    }
@@ -2282,10 +2285,9 @@
    const query = {
      start: 0,
      size: 999,
      filterList: [],
      infoTypes: [],
    }
    app.MG.identity.joinedGroupByList(query).then((res) => {
      console.log('班级信息', res);
      res.datas.forEach(async item => {
        item.topicId = null
        const data = await this.getTopicInfo(item.id)
@@ -2293,21 +2295,47 @@
          item.topicId = data.id
        }
      })
      console.log('班级', res)
      if (res.datas.length) {
        this.setData({
          classList: res.datas
        })
        // 判断班级 是否所属于该书
        const flag = res.datas.some(item => item.linkProductDto.product.id == this.data.bookId)
        if (!flag) {
          this.setData({
            visible: true,
          })
        const classData = res.datas.find(item => item.linkProductDto.product.id == this.data.bookId)
        if (classData) {
          if (classData.userState == 'Normal') {
            // 加入班级
            this.setData({
              joinGroup: true
            })
          } else if (classData.userState == 'WaitValid') {
            this.setData({
              submitStatus: true
            })
            // 审核中
            wx.showModal({
              title: '提示',
              content: '请等待老师审核加入班级后答题',
              confirmColor: "#ff6c00",
              complete: (res) => {
                if (res.cancel) {
                  wx.navigateBack()
                }
                if (res.confirm) {
                  wx.navigateBack()
                }
              }
            })
          } else {
            // 拒绝
            this.setData({
              visible: true
            })
          }
        } else {
          // 未加入班级
          this.setData({
            visible: false,
            joinGroup: true
            visible: true
          })
        }
      } else {
@@ -2316,18 +2344,6 @@
        })
      }
      // if (res.datas.length) {
      //   this.setData({
      //     classList: res.datas,
      //     visible: true
      //   })
      // } else {
      //   // 未加入班级,唤起加入班级弹窗
      //   this.setData({
      //     joinGroup: false,
      //     visible: true
      //   })
      // }
    })
  },
  // 加入班级
@@ -2388,9 +2404,9 @@
          let value = JSON.parse(res[0].value);
          const scoreData = value.dataList.find(item => item.name == "客观题得分" && item.path == this.data.productLinkPath)
          this.setData({
            submitStatus: value.submitStatus,
            currentIndex: value.currentIndex,
            subjectiveNum: scoreData ? scoreData.score : 0
            currentIndex: value.currentIndex ? value.currentIndex : 0,
            subjectiveNum: scoreData ? scoreData.score : 0,
            submitStatus: true
          });
          // 携带答题记录 获取题目
          this.getQuestionList(value.dataList);
@@ -2403,7 +2419,7 @@
      });
  },
  // 提交教学互动答题数据
  setinteractionInfo(submitStatus) {
  setinteractionInfo() {
    const list = []
    this.data.cardList.forEach(item => {
      list.push({
@@ -2420,14 +2436,12 @@
      score: this.data.subjectiveNum,
      path: this.data.productLinkPath,
    })
    console.log('提交数据', list);
    app.MG.identity
      .setUserKey({
        setKeyRequests: [{
          domain: "interactionData",
          key: this.data.productLinkPath,
          value: JSON.stringify({
            submitStatus,
            currentIndex: this.data.currentIndex,
            dataList: list
          }),
@@ -2437,12 +2451,11 @@
  },
  // 处理教学互动答题 
  handleClassQuestion() {
    console.log(1, this.data.questionDataList);
    const flag = this.data.questionDataList.some(item => !item.userAnswer)
    if (flag) {
      // 没做完,保存即可
      const isAnswer = this.data.questionDataList.some(item => item.userAnswer)
      if (isAnswer) this.setinteractionInfo(false)
      if (isAnswer) this.setinteractionInfo()
    } else {
      // 做完了且加入了班级,提交到message
      if (this.data.classList.length && this.data.joinGroup) {
@@ -2450,10 +2463,10 @@
          if (item.linkProductDto.product.id == this.data.bookId)
            this.newTopicMessage(item.topicId)
        })
        this.setinteractionInfo(true)
        this.setinteractionInfo()
      } else {
        // 做完了,没加入班级
        this.setinteractionInfo(false)
        this.setinteractionInfo()
      }
      this.setData({
        isShowDialog: true
@@ -2475,49 +2488,41 @@
        state: citem.questionType == 'shortAnswer' ? 'none' : citem.isRight,
        type: citem.questionType
      })
    }
    const data = {
      description: '',
      icon: '',
      state: 'Normal',
      topicIdOrRefCode: String(topicId),
      name: this.data.answerTitle,
      content: JSON.stringify({
        bookId: this.data.bookId,
        userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).name,
        path: this.data.productLinkPath,
        content
      }),
      type: 'Normal',
      cmsTypeRefCode: '',
      newDataListRequest: []
    }
    app.MG.ugc.newTopicMessage(data).then((res) => {
      if (res) {
        this.setData({
          isShowDialog: true
        })
      const userInfo = JSON.parse(wx.getStorageSync(app.config.userInfoKey))
      const data = {
        description: '',
        icon: '',
        state: 'Normal',
        topicIdOrRefCode: String(topicId),
        name: this.data.answerTitle,
        content: JSON.stringify({
          bookId: this.data.bookId,
          userName: userInfo.name ? userInfo.name : userInfo.nickName ? userInfo.nickName : '-',
          path: this.data.productLinkPath,
          content
        }),
        type: 'Normal',
        cmsTypeRefCode: '',
        newDataListRequest: []
      }
    })
      app.MG.ugc.newTopicMessage(data).then((res) => {
        if (res) {
          this.setData({
            isShowDialog: true
          })
        }
      })
    }
  },
  // 新建子topicMessage
  // newTopicSubMessage(parentId,topicId) {
  //   const data = {
  //     description: '',
  //     icon: '',
  //     parentId,
  //     state: 'Normal',
  //     topicIdOrRefCode: String(topicId),
  //     name: this.data.answerTitle,
  //     content: '',
  //     type: 'Normal',
  //     cmsTypeRefCode: '',
  //     newDataListRequest: []
  //   }
  //   MG.ugc.newTopicMessage(data).then((res) => {
  //     if (res) {
  //     }
  //   })
  // },
});
  // 删除教学互动答题记录
  delinteractionInfo(callback) {
    app.MG.identity
      .delUserKey({
        domain: 'interactionData',
        keys: [this.data.productLinkPath]
      })
      .then((res) => {
        if (callback) callback()
      })
  }
})
packageBookService/pages/bookServices/examination/examination.wxml
@@ -59,6 +59,7 @@
      subjectiveGrade="{{subjectiveGrade}}"
      correctNum="{{correctNum}}"
      mockSumTime="{{mockData.sumTime}}"
      joinGroup="{{joinGroup}}"
      showId="{{showId}}"
      bind:setCollect="setCollect"
      bind:submitPaper="submitPaper"
@@ -80,6 +81,4 @@
></page-container>
<!-- 加入班级弹窗 -->
<join-dialog visible="{{visible}}" bind:joinClass="joinClass">
</join-dialog>
<join-dialog visible="{{visible}}" bind:joinClass="joinClass"> </join-dialog>
packageBookService/pages/bookServices/examination/questionOptions/index.js
@@ -57,6 +57,9 @@
    },
    isShowDialog: {
      type: Boolean
    },
    joinGroup:{
      type:Boolean
    }
  },
packageBookService/pages/bookServices/examination/questionOptions/index.wxml
@@ -37,7 +37,7 @@
  <view
    class="li-option"
    bind:tap="resterBtn"
    wx:if="{{answerType == 'option' || (answerType == 'mock' && !submitStatus)}}"
    wx:if="{{answerType == 'option' || (answerType == 'mock' && !submitStatus) || (answerType == 'interaction' && !joinGroup)}}"
    style="color: {{isNight ? '#fff' : '#000'}};"
  >
    <image
packageCourse/components/studentManage/index.wxss
@@ -86,6 +86,7 @@
  width: 85vw;
  height: 180px;
  border-radius: 10rpx;
  position: relative;
}
.block-select-title {
@@ -99,7 +100,7 @@
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 70rpx 20rpx;
  padding: 50rpx 20rpx;
  box-sizing: border-box;
}
@@ -111,7 +112,12 @@
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 20rpx;
  min-height: 120rpx;
  padding: 0rpx 20rpx;
  box-sizing: border-box;
  position: absolute;
  bottom: 0;
  right: 0;
}
packageCourse/components/teaching/index.js
@@ -214,7 +214,6 @@
    },
    // 处理数据结构
    chageData(arr, zrr) {
      let newData = []
      // 题库题目类型
      const questionTypeList = [{
          name: '单选题',
@@ -259,22 +258,30 @@
      ]
      for (let i = 0; i < arr.length; i++) {
        const item = arr[i]
        item.questionTypeList = questionTypeList
        for (let j = 0; j < zrr.length; j++) {
          const ele = zrr[j]
          const qusObj = item.question.find((citem) => citem.cmsItemId == ele.id)
          if (qusObj?.cmsItemId) {
            ele.userAnswer = qusObj.answer
            const index = findIndexByValue(questionTypeList, ele.questionType)
            if (index > -1) {
              item.questionTypeList[index].data.push(ele)
        item.questionTypeList = JSON.parse(JSON.stringify(questionTypeList));
        item.other = []
        for (let j = 0; j < item.question.length; j++) {
          const ele = item.question[j]
          const data = zrr.find((sitem) => sitem.id == ele.cmsItemId)
          const index = findIndexById(zrr, ele.cmsItemId)
          if (index > -1) {
            item.other[index] = {
              ...data,
              userAnswer: ele.answer
            }
          }
        }
        item.questionTypeList = item.questionTypeList.filter((item) => item.data.length > 0)
        newData.push(item)
        if (item.other.length > 0) {
          item.other.forEach((aitem) => {
            const index = findIndexByValue(item.questionTypeList, aitem.questionType)
            if (index > -1) {
              item.questionTypeList[index].data.push(aitem)
            }
          })
        }
        item.questionTypeList = item.questionTypeList.filter((xitem) => xitem.data.length > 0)
      }
      return newData.filter((item) => item.questionTypeList.length > 0)
      return arr
    },
    findIndexByValue(res, type) {
      for (let i = 0; i < res.length; i++) {
@@ -284,6 +291,16 @@
      }
      return -1 // 如果未找到,则返回 -1
    },
    findIndexById(res, id) {
      for (let i = 0; i < res.length; i++) {
        if (res[i].id == id) {
          return i
        }
      }
      return -1 // 如果未找到,则返回 -1
    },
    toDetail(e) {
      const {
        item
packageCourse/pages/course/detail/index.js
@@ -26,6 +26,8 @@
    },
    courseLoading: true,
    classLoading: false,
    showContentOnly: false,
    reason: '',
    // 加载参数
    bottomLoading: false,
    isMoreData: false,
@@ -49,6 +51,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
    });
  },
  // 获取课程信息
@@ -354,14 +374,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,
    })
packageCourse/pages/course/detail/index.json
@@ -10,6 +10,7 @@
    "t-back-top": "tdesign-miniprogram/back-top/back-top",
    "empty": "/components/empty/index",
    "t-skeleton": "tdesign-miniprogram/skeleton/skeleton",
    "t-loading": "tdesign-miniprogram/loading/loading"
    "t-loading": "tdesign-miniprogram/loading/loading",
    "t-dialog": "tdesign-miniprogram/dialog/dialog"
  }
}
packageCourse/pages/course/detail/index.wxml
@@ -67,7 +67,11 @@
              <text class="classTag" wx:if="{{item.applyState == 'Normal'}}" style="color: #1dbd11">状态: 进行中</text>
              <text class="classTag" wx:if="{{item.applyState == 'Reject'}}" style="color: red">状态: 未通过</text>
              <t-icon bindtap="delClass" data-del-id="{{item.id}}" class="delete" wx:if="{{item.applyState == 'Reject'}}" name="delete" color="red" size='18px' />
              <text class="classTag" wx:if="{{item.applyState == 'Reject'}}" style="color: red">拒绝原因:{{ item.reason != '' ? item.reason : '-' }}</text>
              <view wx:if="{{item.applyState == 'Reject'}}" class="reason">
                <text> 拒绝原因:</text>
                <t-tag style="margin-left: 0;" bind:tap="showDialog" data-item="{{item}}" class="margin-16 replay" theme="danger">点击查看</t-tag>
              </view>
              <!-- <text class="classTag" wx:if="{{item.applyState == 'Reject'}}" style="color: red">拒绝原因:{{ item.reason != '' ? item.reason : '-' }}</text> -->
              <text class="classTag">班级人数: {{ item.memberCount }} / {{ item.maxUserCount }}</text>
              <text class="classTag">有效期:{{ item.beginDate }} - {{ item.endDate }}</text>
            </view>
@@ -124,6 +128,14 @@
          </view>
        </view>
      </t-popup>
      <t-dialog visible="{{showContentOnly}}" bind:confirm="closeDialog" close-on-overlay-click>
        <view slot="content" class="reasonContent">
          {{reason}}
        </view>
        <view slot="confirm-btn" style="width: 100%;">
          <t-button style="color: #ff6d00;border-top: 1px solid #eee ;" variant="text" bindtap="closeDialog" size="large" block t-class="external-class">知道了</t-button>
        </view>
      </t-dialog>
    </view>
  </view>
  <view class="tabbar-bottom">
packageCourse/pages/course/detail/index.wxss
@@ -122,6 +122,26 @@
  font-weight: 700;
}
.replay {
  margin-left: 20rpx;
  background-color: red !important;
  border: 0 !important;
}
.reason {
  margin-bottom: 10rpx;
}
.reasonContent {
  color: #666;
  font-size: 26rpx;
  line-height: 44rpx;
}
.external-class {
  border-radius: 0 !important;
}
.statics {
  width: 100%;
  margin-bottom: 40rpx;
@@ -274,6 +294,10 @@
  top: 55px !important
}
.classBox .t-dialog {
  border: 1rpx solid #eee;
}
.block-title {
  padding: 30rpx 20rpx;
  font-size: 30rpx;
packageCourse/pages/course/index.js
@@ -34,6 +34,7 @@
    updateCourse: false,
    currentCourse: null,
    submitLoading: false,
    showContentOnly: false,
    // 加载参数
    bottomLoading: false,
    isMoreData: false,
@@ -50,6 +51,18 @@
    this.getData()
  },
  showDialog() {
    this.setData({
      showContentOnly: true,
    });
  },
  closeDialog() {
    this.setData({
      showContentOnly: false
    });
  },
  // 课程详情
  todetail(e) {
    const {
packageCourse/pages/course/index.json
@@ -13,6 +13,7 @@
    "t-icon": "tdesign-miniprogram/icon/icon",
    "t-back-top": "tdesign-miniprogram/back-top/back-top",
    "t-tag": "tdesign-miniprogram/tag/tag",
    "t-loading": "tdesign-miniprogram/loading/loading"
    "t-loading": "tdesign-miniprogram/loading/loading",
    "t-dialog": "tdesign-miniprogram/dialog/dialog"
  }
}
packageCourse/pages/course/index.wxml
@@ -28,7 +28,18 @@
            </view>
            <t-tag class="margin-16" wx:if="{{item.applyState == 'Normal'}}" variant="light" theme="success">使用中</t-tag>
          </view>
          <view wx:if="{{item.applyState == 'Reject'}}" class="reason">拒绝原因: {{item.reason}}</view>
          <view wx:if="{{item.applyState == 'Reject'}}" class="reason">
            <text> 拒绝原因:</text>
            <t-tag style="margin-left: 0;" bind:tap="showDialog" class="margin-16 replay" theme="danger">点击查看</t-tag>
            <t-dialog visible="{{showContentOnly}}" bind:confirm="closeDialog" close-on-overlay-click>
              <view slot="content" class="reasonContent">
                {{item.reason}}
              </view>
              <view slot="confirm-btn" style="width: 100%;">
                <t-button style="color: #ff6d00;border-top: 1px solid #eee;" variant="text" bindtap="closeDialog" size="large" block t-class="external-class">知道了</t-button>
              </view>
            </t-dialog>
          </view>
          <view class="desc">描述:{{item.description}}</view>
        </view>
      </view>
packageCourse/pages/course/index.wxss
@@ -71,7 +71,7 @@
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  height: 300rpx;
  min-height: 300rpx;
  border-bottom: 1rpx solid #eee;
}
@@ -79,8 +79,16 @@
  margin-left: 20rpx;
  background-color: red !important;
  border: 0 !important;
  position: relative;
  z-index: 999999;
}
.reasonContent {
  color: #666;
  font-size: 26rpx;
  line-height: 44rpx;
}
.external-class {
  border-radius: 0 !important;
}
.courseIcon {
@@ -116,6 +124,9 @@
.courseInfo .reason {
  font-size: 24rpx;
  color: red;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.courseInfo .desc {
packageCourse/pages/studentClass/index.wxml
@@ -20,19 +20,18 @@
            <text class="classTag" wx:if="{{item.userState == 'WaitValid'}}" style="color: #ef9f29">状态 : 审核中</text>
            <text class="classTag" wx:if="{{item.userState == 'Normal'}}" style="color: #1dbd11">状态 : 进行中</text>
            <text class="classTag" wx:if="{{item.userState == 'Reject'}}" style="color: red">状态 : 未通过</text>
            <t-icon bindtap="delClass" data-del-id="{{item.id}}" class="delete" wx:if="{{item.userState == 'Reject'}}" name="delete" color="red" size='18px' />
            <!-- <t-icon bindtap="delClass" data-del-id="{{item.id}}" class="delete" wx:if="{{item.userState == 'Reject'}}" name="delete" color="red" size='18px' /> -->
            <text class="classTag" wx:if="{{item.userState == 'Reject'}}" style="color: red">拒绝原因:{{ item.reason != '' ? item.reason : '-' }}</text>
            <text class="classTag">班级人数 : {{ item.memberCount }} / {{ item.maxUserCount }}</text>
            <text class="classTag">有效期 :{{ item.classTime }}</text>
          </view>
        </view>
      </view>
      <view class="bottom-loading" wx:if="{{bottomLoading}}">
        <t-loading theme="circular" size="40rpx" text="加载中..." class="wrapper" />
      </view>
      <view class="bottom-loading" style="color: #ccc;font-size: 28rpx;" wx:if="{{isMoreData}}">
        <text>没有更多了</text>
        <view class="bottom-loading" wx:if="{{bottomLoading}}">
          <t-loading theme="circular" size="40rpx" text="加载中..." class="wrapper" />
        </view>
        <view class="bottom-loading" style="color: #ccc;font-size: 28rpx;" wx:if="{{isMoreData}}">
          <text>没有更多了</text>
        </view>
      </view>
    </scroll-view>
  </view>
packageCourse/pages/teachClass/detail/index.js
@@ -231,7 +231,7 @@
    ]
    for (let i = 0; i < arr.length; i++) {
      const item = arr[i]
      item.questionTypeList = questionTypeList
      item.questionTypeList = JSON.parse(JSON.stringify(questionTypeList))
      for (let j = 0; j < zrr.length; j++) {
        const ele = zrr[j]
        const qusObj = item.question.find((citem) => citem.cmsItemId == ele.id)
packageCourse/pages/teachClass/index.wxml
@@ -10,7 +10,7 @@
      <studentManage classId="{{classId}}" bookRefCode="{{defaultCmsPath}}" />
    </view>
    <!-- 教学互动 -->
    <view class="teachBox" wx:if="{{tabVal == 'teach'}}">
    <view class="teachBox" wx:if="{{tabVal == 'teach'&& userData.role == 'Teacher'}}">
      <Teach classId="{{classId}}" bookId="{{bookId}}" rootCmsItemId="{{rootCmsItemId}}" />
    </view>
  </view>
@@ -23,7 +23,7 @@
      <t-icon class="tabIcon" name="file-setting" size="24px" />
      <text class="text">学生管理</text>
    </view>
    <view class="{{tabVal == 'teach'?'tab-pubItem activeTab':'tab-pubItem'}}" data-str="teach" bindtap="tabActive">
    <view wx:if="{{ userData.role == 'Teacher'}}" class="{{tabVal == 'teach'?'tab-pubItem activeTab':'tab-pubItem'}}" data-str="teach" bindtap="tabActive">
      <t-icon class="tabIcon" name="system-setting" size="24px" />
      <text class="text">教学互动</text>
    </view>
pages/cart/index.js
@@ -130,8 +130,13 @@
          item.productType = "图书服务-电子书"
          if (item.saleMethod.type == 'createProductItemSaleMethod' || item.saleMethod.type == 'createProductFolderSaleMethod') {
            item.typeTxt = '云学习'
            item.productType = "图书服务-云学习"
            if (item.linkCmsItems[0].refCode == 'questionBank') {
              item.type = '云测试'
              item.productType = '图书服务-云测试'
            } else {
              item.typeTxt = '云学习'
              item.productType = "图书服务-云学习"
            }
          }
        }
        //