liushengqiang 2 年之前
父節點
當前提交
d6ba09c16a
共有 2 個文件被更改,包括 14 次插入5 次删除
  1. 13 5
      src/views/courseList/index.tsx
  2. 1 0
      src/views/coursewarePlay/component/video-play.tsx

+ 13 - 5
src/views/courseList/index.tsx

@@ -96,13 +96,21 @@ export default defineComponent({
     }
     // 去课件播放
     const gotoPlay = (item: any) => {
-      router.push({
-        path: '/coursewarePlay',
-        query: {
-          id: item.lessonCoursewareDetailId,
-          source: 'my-course'
+      postMessage({
+        api: 'openWebView',
+        content: {
+          url: `${location.origin}${location.pathname}/#/coursewarePlay?id=${item.lessonCoursewareDetailId}`,
+          orientation: 0,
+          isHideTitle: true
         }
       })
+      // router.push({
+      //   path: '/coursewarePlay',
+      //   query: {
+      //     id: item.lessonCoursewareDetailId,
+      //     source: 'my-course'
+      //   }
+      // })
     }
     // 检查数据的缓存状态
     const checkCoursewareCache = (list: []) => {

+ 1 - 0
src/views/coursewarePlay/component/video-play.tsx

@@ -143,6 +143,7 @@ export default defineComponent({
           style={{ width: '100%', height: '100%' }}
           src={item.value.content}
           ref={videoRef}
+          playsinline="false"
         ></video>
       </div>
     )