lex-xin 2 달 전
부모
커밋
da38590a79
2개의 변경된 파일1개의 추가작업 그리고 38개의 파일을 삭제
  1. 1 1
      src/views/courseListSearch/child-node.tsx
  2. 0 37
      src/views/coursewarePlay/index.tsx

+ 1 - 1
src/views/courseListSearch/child-node.tsx

@@ -60,7 +60,7 @@ const ChildNode = defineComponent({
         postMessage({
           api: 'openWebView',
           content: {
-            url: `${location.origin}${location.pathname}#/coursewarePlay?lessonId=${props.id}&source=search&kId=${item.id}&search=${props.search}`,
+            url: `${location.origin}${location.pathname}#/coursewarePlay?lessonId=${props.id}&source=search&kId=${item.id}&search=${encodeURIComponent(props.search)}`,
             orientation: 0,
             isHideTitle: true,
             statusBarTextColor: false,

+ 0 - 37
src/views/coursewarePlay/index.tsx

@@ -430,41 +430,6 @@ export default defineComponent({
     };
 
 
-    /** 搜索页面 获取当前播放元素 */
-    const checkRecursionCoursewareId = (list: [], id: string) => {
-      list.forEach((parent: any) => {
-        if(Array.isArray(parent.materialList)) {
-          const parentMaterial = parent.materialList || []
-          parentMaterial.forEach((item: any) => {
-            console.log(item.materialId, id, '------------------------------')
-            if(item.materialId == id) {
-              console.log(item, '---------------')
-              return true
-            }
-          })
-        }
-        if(Array.isArray(parent.child)) {
-          const parentItem = parent.child || []
-          checkRecursionCoursewareId(parentItem, id)
-        }
-      })
-    }
-    const getSearchParentCoursewareId = (list: [], id: string) => {
-      if(!id || list.length <= 0) return
-
-      // list.knowledgePointList.forEach(element => {
-        
-      // });
-      // let coursewareDetailId = ''
-      console.log(list, '12121--------')
-      list.forEach((parent: any) => {
-        if(Array.isArray(parent.knowledgePointList)) {
-          const parentItem = parent.knowledgePointList || []
-          console.log(checkRecursionCoursewareId(parentItem, id))
-        }
-      })
-    }
-
     /** 从搜索页面来的 */
     const getSearchDetail = async (params: { type?: string, id?: any, search?: string }) => {
       try {
@@ -558,8 +523,6 @@ export default defineComponent({
         detailList.value = result
         detailTempSearchList.value = result
 
-        // getSearchParentCoursewareId(result, route.query.kId as any)  
-
         if(!params.type) {
           let _firstIndex = allList.findIndex(
             (n: any) =>