skyblued 2 gadi atpakaļ
vecāks
revīzija
b0ea1e1617
2 mainītis faili ar 12 papildinājumiem un 22 dzēšanām
  1. 4 14
      src/views/courseList/index.tsx
  2. 8 8
      src/views/coursewarePlay/index.tsx

+ 4 - 14
src/views/courseList/index.tsx

@@ -58,8 +58,8 @@ export default defineComponent({
         setCoursewareDetail(item)
         return
       }
-      // const isCache = await checkCache(item)
-      // if (!isCache) return
+      const isCache = await checkCache(item)
+      if (!isCache) return
       router.push({
         path: '/coursewarePlay',
         query: {
@@ -115,10 +115,8 @@ export default defineComponent({
                     {route.query.code !== 'select' && <div>已使用 {item.useNum} 次</div>}
                   </div>
                   {route.query.code !== 'select' ? (
-                    <div class={styles.num} onClick={(e: Event) => {
-                      e.stopPropagation()
-                    }}>
-                      缓存
+                    <div class={styles.num} >
+                      查看
                       <Icon name="play-circle-o" />
                     </div>
                   ) : (
@@ -136,14 +134,6 @@ export default defineComponent({
           })}
         </Grid>
         {!data.loading && !data.list.length && <Empty description="空空如也" />}
-        <Button
-          onClick={() => {
-            location.href =
-              'http://192.168.3.114:1000/teacher.html#/coursewarePlay?id=1610595720511209474&courseId=1612270880549044226'
-          }}
-        >
-          胜强测试
-        </Button>
       </div>
     )
   }

+ 8 - 8
src/views/coursewarePlay/index.tsx

@@ -124,14 +124,14 @@ export default defineComponent({
         const item = data.knowledgePointList[i]
         for (let j = 0; j < item.materialList.length; j++) {
           const material = item.materialList[j]
-          if (browserInfo.isApp && ['VIDEO', 'IMG'].includes(material.type)){
-            const localData = await getCacheFilePath(material)
-            if (localData?.content?.localPath){
-              material.url = material.content
-              material.content = localData.content.localPath
-              // console.log("🚀 ~ material", material)
-            }
-          }
+          // if (browserInfo.isApp && ['VIDEO', 'IMG'].includes(material.type)){
+          //   const localData = await getCacheFilePath(material)
+          //   if (localData?.content?.localPath){
+          //     material.url = material.content
+          //     material.content = localData.content.localPath
+          //     // console.log("🚀 ~ material", material)
+          //   }
+          // }
           if (popupData.itemActive === '') {
             popupData.tabName = item.name
             popupData.tabActive = material.knowledgePointId