|
@@ -223,15 +223,27 @@ export default defineComponent({
|
|
|
// });
|
|
|
// });
|
|
|
res.data.forEach((item: any) => {
|
|
|
- item.knowledgeList = item.resourceList;
|
|
|
item.resourceList.forEach((n: any) => {
|
|
|
n.materialInfo = n.resourceList;
|
|
|
+ n.audioPlayTypesArray = n.audioPlayTypes
|
|
|
+ ? n.audioPlayTypes.split(',')
|
|
|
+ : [];
|
|
|
});
|
|
|
+ item.knowledgeList = item.resourceList;
|
|
|
});
|
|
|
data.allList = res.data;
|
|
|
const currentCourse = res.data.find(
|
|
|
(item: any) => item.id === data.kjId
|
|
|
);
|
|
|
+ currentCourse?.knowledgeList?.forEach((item: any) => {
|
|
|
+ if (item.materialInfo && item.materialInfo.length > 0) {
|
|
|
+ item.materialInfo?.forEach((n: any) => {
|
|
|
+ n.audioPlayTypesArray = n.audioPlayTypes
|
|
|
+ ? n.audioPlayTypes.split(',')
|
|
|
+ : [];
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
data.zsdId = currentCourse?.knowledgeList?.[0].id;
|
|
|
courseList = currentCourse?.knowledgeList?.[0].materialInfo || [];
|
|
|
data.currentCourse = currentCourse || {};
|
|
@@ -251,6 +263,15 @@ export default defineComponent({
|
|
|
const currentCourse = res.data.find(
|
|
|
(item: any) => item.id === data.kjId
|
|
|
);
|
|
|
+ currentCourse?.knowledgeList?.forEach((item: any) => {
|
|
|
+ if (item.materialInfo && item.materialInfo.length > 0) {
|
|
|
+ item.materialInfo?.forEach((n: any) => {
|
|
|
+ n.audioPlayTypesArray = n.audioPlayTypes
|
|
|
+ ? n.audioPlayTypes.split(',')
|
|
|
+ : [];
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
data.zsdId = currentCourse?.knowledgeList?.[0].id;
|
|
|
courseList = currentCourse?.knowledgeList?.[0].materialInfo || [];
|
|
|
data.currentCourse = currentCourse || {};
|
|
@@ -280,7 +301,7 @@ export default defineComponent({
|
|
|
console.log(data.allList, 'data.allList');
|
|
|
data.allList.forEach((item: any) => {
|
|
|
item.knowledgeList.forEach((material: any) => {
|
|
|
- material.materialInfo.forEach((resource: any) => {
|
|
|
+ material.materialInfo?.forEach((resource: any) => {
|
|
|
resource.zsdId = material.id; // 知识点id
|
|
|
resource.kjId = item.id; // 课件id
|
|
|
resource.bizId =
|