瀏覽代碼

修改显示

lex 6 月之前
父節點
當前提交
6b20c435cd
共有 1 個文件被更改,包括 9 次插入1 次删除
  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) => {
                   cn.materialList = cn.materialList.map((item: any) => {
                     index++;
+                    const materialRefs = item.materialRefs
+                      ? item.materialRefs
+                      : [];
+                    const materialMusicId =
+                      materialRefs.length > 0
+                        ? materialRefs[0].resourceIdStr
+                        : null;
                     return {
                       ...item,
+                      materialMusicId,
                       content: item.content,
                       knowledgePointId: [n.id, item.knowledgePointId],
                       materialId: item.id,
@@ -872,7 +880,7 @@ export default defineComponent({
           tempTime[1] - tempTime[0] - currentTimer.counter.value > 2;
         // 结束时间,如果 大于开始时间则清除
         if (tempTime[1] >= tempTime[0] && !diffTime) {
-          data.itemList[popupData.activeIndex].moreTime.push(tempTime);
+          data.itemList[popupData.activeIndex].moreTime?.push(tempTime);
           // moreTime.value.push(tempTime)
         }
         if (repeat) {