浏览代码

课后训练视频,没有updateTime不检查本地缓存

skyblued 2 年之前
父节点
当前提交
17241d3f6f
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/views/exercise-after-class/index.tsx

+ 2 - 2
src/views/exercise-after-class/index.tsx

@@ -126,7 +126,8 @@ export default defineComponent({
           videoData.training = JSON.parse(videoData?.lessonTrainingTemp?.trainingConfigJson)
         } catch (error) {}
         //请求本地缓存
-        if (browserInfo.isApp && ['VIDEO'].includes(videoData.type)) {
+        if (browserInfo.isApp && videoData.updateTime && ['VIDEO'].includes(videoData.type)) {
+          console.log('开始检查本地缓存')
           const localData = await getCacheFilePath(videoData)
           console.log("🚀 ~ 本地缓存数据", localData)
           if (localData?.content?.localPath) {
@@ -134,7 +135,6 @@ export default defineComponent({
             videoData.content = localData.content.localPath
           }
         }
-        console.log(videoData.content)
         data.itemList.push({
           ...videoData,
           id: videoData.materialId,