Browse Source

Merge branch 'iteration-courseware-search' into jenkins-main

lex-xin 2 months ago
parent
commit
0bbae0e657
1 changed files with 3 additions and 4 deletions
  1. 3 4
      src/views/courseListSearch/child-node.tsx

+ 3 - 4
src/views/courseListSearch/child-node.tsx

@@ -4,15 +4,14 @@ import { Cell, Collapse, CollapseItem } from "vant";
 import iconVideo from './image/icon-video.png'
 import iconSong from './image/icon-song.png'
 import iconImage from './image/icon-image.png'
-import { useRouter } from "vue-router";
 
 // 获取对应图片
 export const getImage = (item: any) => {
-  if (item.typeCode === 'VIDEO') {
+  if (item.type === 'VIDEO') {
     return iconVideo;
-  } else if (['IMAGE', 'IMG'].includes(item.typeCode)) {
+  } else if (['IMAGE', 'IMG'].includes(item.type)) {
     return iconImage;
-  } else if (item.typeCode === 'SONG') {
+  } else if (item.type === 'SONG') {
     return iconSong;
   } else {
     return iconVideo;