Browse Source

修改显示

lex 6 months ago
parent
commit
6b20c435cd
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/views/coursewarePlay/index.tsx

+ 9 - 1
src/views/coursewarePlay/index.tsx

@@ -336,8 +336,16 @@ export default defineComponent({
                 n.children = n.children.map((cn: any) => {
                 n.children = n.children.map((cn: any) => {
                   cn.materialList = cn.materialList.map((item: any) => {
                   cn.materialList = cn.materialList.map((item: any) => {
                     index++;
                     index++;
+                    const materialRefs = item.materialRefs
+                      ? item.materialRefs
+                      : [];
+                    const materialMusicId =
+                      materialRefs.length > 0
+                        ? materialRefs[0].resourceIdStr
+                        : null;
                     return {
                     return {
                       ...item,
                       ...item,
+                      materialMusicId,
                       content: item.content,
                       content: item.content,
                       knowledgePointId: [n.id, item.knowledgePointId],
                       knowledgePointId: [n.id, item.knowledgePointId],
                       materialId: item.id,
                       materialId: item.id,
@@ -872,7 +880,7 @@ export default defineComponent({
           tempTime[1] - tempTime[0] - currentTimer.counter.value > 2;
           tempTime[1] - tempTime[0] - currentTimer.counter.value > 2;
         // 结束时间,如果 大于开始时间则清除
         // 结束时间,如果 大于开始时间则清除
         if (tempTime[1] >= tempTime[0] && !diffTime) {
         if (tempTime[1] >= tempTime[0] && !diffTime) {
-          data.itemList[popupData.activeIndex].moreTime.push(tempTime);
+          data.itemList[popupData.activeIndex].moreTime?.push(tempTime);
           // moreTime.value.push(tempTime)
           // moreTime.value.push(tempTime)
         }
         }
         if (repeat) {
         if (repeat) {