Explorar el Código

Merge branch 'master' of http://git.dayaedu.com/lex/orchestra-app

mo hace 2 años
padre
commit
1c314a71a2

+ 52 - 17
src/views/coursewarePlay/component/point.module.less

@@ -1,25 +1,60 @@
 .container {
+  min-width: 217px;
   min-height: 100vh;
-  background: rgba(0, 0, 0, 0.5);
-  border-radius: 0px 12Px 12Px 0px;
   color: #fff;
-  font-size: 16Px;
-  padding: 38Px 20Px 20Px 40Px;
+  font-size: 12px;
   box-sizing: border-box;
 }
-.pointHead{
-    display: flex;
-    align-items: center;
-    padding-bottom: 10Px;
-    img{
-        width: 24Px;
-        height: 24Px;
-        margin-right: 8Px;
+.pointHead {
+  display: flex;
+  align-items: center;
+  padding: 13px 10px 15px 15px;
+  img {
+    width: 16px;
+    height: 16px;
+    margin-right: 7px;
+  }
+}
+.collapse {
+  &:after {
+    display: none;
+    border-width: 0;
+  }
+  :global {
+    .van-cell {
+      background: transparent;
+      font-size: 12px;
+      color: #fff;
+      padding: 0 13px 6px 18px;
+    }
+    .van-collapse-item--border:after {
+      display: none;
+    }
+    .van-collapse-item__content {
+      background: transparent;
+      color: #fff;
+      font-size: 10px;
+      padding: 0 13px 6px 33px;
     }
+  }
+  .arrow {
+    display: block;
+    width: 10px;
+    height: 10px;
+    margin-right: 6px;
+    transition: all 0.3s;
+  }
+  :global(.van-collapse-item__title--expanded) {
+    .arrow {
+      transform: rotate(90deg);
+    }
+  }
+}
+.item {
+  padding: 4px 5px;
+  border-radius: 6px;
 }
-.item{
-    padding: 11px 0;
+.itemActive {
+  background: rgba(0, 0, 0, 0.15);
+  color: var(--van-primary);
 }
-.itemActive{
-    color: var(--van-primary);
-}

+ 30 - 35
src/views/coursewarePlay/component/points.tsx

@@ -1,6 +1,7 @@
 import { defineComponent, reactive } from 'vue'
 import styles from './point.module.less'
 import iconMulv from '../image/icon-mulv.svg'
+import iconArrow from '../image/icon-arrow.svg'
 import { Collapse, CollapseItem } from 'vant'
 export default defineComponent({
   name: 'points',
@@ -9,7 +10,11 @@ export default defineComponent({
       type: Array,
       default: () => []
     },
-    active: {
+    tabActive: {
+      type: String,
+      default: ''
+    },
+    itemActive: {
       type: String,
       default: ''
     }
@@ -17,7 +22,7 @@ export default defineComponent({
   emits: ['handleSelect'],
   setup(props, { emit }) {
     const pointData = reactive({
-      active: 1
+      active: props.tabActive || '1610827376354500609' || ''
     })
     return () => (
       <div class={styles.container}>
@@ -26,41 +31,31 @@ export default defineComponent({
             <img src={iconMulv} />
             课程目录
           </div>
-          <div class={styles.items}>
+          <Collapse
+            class={styles.collapse}
+            modelValue={pointData.active}
+            onUpdate:modelValue={(val: any) => {
+              console.log(val)
+              pointData.active = val
+            }}
+            accordion
+          >
             {props.data.map((item: any) => {
               return (
-                <>
-                  {Array.isArray(item?.materialList) &&
-                    item.materialList.map((n: any, index: number) => {
-                      return (
-                        <div
-                          class={[
-                            styles.item,
-                            `${item.id}-${n.id}` === props.active ? styles.itemActive : ''
-                          ]}
-                          onClick={() =>
-                            emit('handleSelect', {
-                              id: item.id,
-                              index,
-                              active: `${item.id}-${n.id}`
-                            })
-                          }
-                        >
-                          {item.name}-{n.name}
-                        </div>
-                      )
-                    })}
-                </>
-              )
-            })}
-          </div>
-          <Collapse modelValue={pointData.active} accordion>
-            {[1, 2, 3].map((item: any) => {
-              return (
-                <CollapseItem title={'标题' + item} name={item}>
-                  {[1, 2, 3, 4].map((n: any) => {
-                    return <div>12</div>
-                  })}
+                <CollapseItem center border={false} isLink={false} title={item.name} name={item.id}>
+                  {{
+                    default: () => (
+                      <>
+                        {Array.isArray(item?.materialList) &&
+                          item.materialList.map((n: any) => {
+                            return <div class={[styles.item, props.itemActive == n.id ? styles.itemActive : '']} onClick={() => {
+                              emit('handleSelect', {itemActive: n.id, tabActive: item.id})
+                            }}>{n.name}</div>
+                          })}
+                      </>
+                    ),
+                    icon: () => <img class={styles.arrow} src={iconArrow} />
+                  }}
                 </CollapseItem>
               )
             })}

+ 15 - 0
src/views/coursewarePlay/image/icon-arrow.svg

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>切片</title>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="课件播放目录(老师)" transform="translate(-570.000000, -213.000000)" fill="#FFFFFF">
+            <g id="编组" transform="translate(548.000000, 0.000000)">
+                <g id="编组-5" transform="translate(22.000000, 209.000000)">
+                    <g id="展开更多备份" transform="translate(6.000000, 10.000000) rotate(-90.000000) translate(-6.000000, -10.000000) translate(0.000000, 4.000000)">
+                        <path d="M6.85328183,4.39627936 L10.070225,9.66036817 C10.3582139,10.1316227 10.2096477,10.7471111 9.73839317,11.0351 C9.58138526,11.1310493 9.40094791,11.1818182 9.21694316,11.1818182 L2.78305684,11.1818182 C2.23077209,11.1818182 1.78305684,10.7341029 1.78305684,10.1818182 C1.78305684,9.99781343 1.83382572,9.81737609 1.92977501,9.66036817 L5.14671817,4.39627936 C5.43470705,3.92502482 6.05019547,3.77645865 6.52145001,4.06444754 C6.6568159,4.14717114 6.77055823,4.26091347 6.85328183,4.39627936 Z" id="展开更多" transform="translate(6.000000, 7.090909) rotate(-180.000000) translate(-6.000000, -7.090909) "></path>
+                    </g>
+                </g>
+            </g>
+        </g>
+    </g>
+</svg>

+ 23 - 0
src/views/coursewarePlay/image/icon-loop-active.svg

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>切片</title>
+    <defs>
+        <path d="M5.00480947,15.25 C6.49624217,17.8332372 9.29235844,19.1935866 12.0802733,18.9792617 C12.1933752,19.672858 12.4261755,20.3264161 12.7562805,20.918295 C9.05647623,21.4111568 5.25493468,19.6832296 3.27275866,16.25 C2.99661629,15.7717074 3.16049144,15.160117 3.63878407,14.8839746 C4.11707669,14.6078322 4.7286671,14.7717074 5.00480947,15.25 Z M10.4132849,7.08904722 L10.5144958,7.14250707 L15.5144958,10.1425071 C16.123756,10.5080632 16.1595948,11.3606179 15.6220123,11.7834679 L15.5144958,11.8574929 L10.5144958,14.8574929 C9.88129747,15.2374119 9.08434351,14.8231057 9.00623111,14.1142925 L9,14 L9,8 C9,7.26157025 9.76529405,6.79134664 10.4132849,7.08904722 Z M19.7272413,6.75 C20.8183076,8.63978222 21.1863003,10.7486105 20.9170607,12.7561204 C20.3245684,12.4254359 19.6711964,12.1929305 18.9778301,12.0792818 C19.0927198,10.6209049 18.7822682,9.11325853 17.9951905,7.75 C15.9241227,4.16280532 11.3371947,2.93374166 7.75,5.00480947 C6.85788041,5.51987496 6.09738693,6.19866524 5.49784407,6.99904787 L7,7 C7.51283584,7 7.93550716,7.38604019 7.99327227,7.88337887 L8,8 C8,8.51283584 7.61395981,8.93550716 7.11662113,8.99327227 L7,9 L3,9 C2.48716416,9 2.06449284,8.61395981 2.00672773,8.11662113 L2,8 L2,4 C2,3.44771525 2.44771525,3 3,3 C3.51283584,3 3.93550716,3.38604019 3.99327227,3.88337887 L4,4 L3.99919549,5.66623947 C4.74283972,4.70951337 5.67119653,3.89560614 6.75,3.27275866 C11.2937799,0.649406102 17.1038888,2.20622008 19.7272413,6.75 Z M11.001,9.766 L11.001,12.233 L13.057,11 L11.001,9.766 Z" id="path-1"></path>
+        <filter x="-31.6%" y="-31.6%" width="163.2%" height="163.1%" filterUnits="objectBoundingBox" id="filter-2">
+            <feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
+            <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
+            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.15 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
+        </filter>
+    </defs>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="课件播放(控件)" transform="translate(-42.000000, -289.000000)" fill-rule="nonzero">
+            <g id="循环备份" transform="translate(42.000000, 289.000000)">
+                <g id="形状结合">
+                    <use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
+                    <use fill="#FFFFFF" xlink:href="#path-1"></use>
+                </g>
+                <path d="M18,13 C20.7614237,13 23,15.2385763 23,18 C23,20.7614237 20.7614237,23 18,23 C15.2385763,23 13,20.7614237 13,18 C13,15.2385763 15.2385763,13 18,13 Z M20.9553274,16.1420886 C20.7524108,15.9832858 20.4506336,16.0042922 20.2548135,16.2001122 L20.2548135,16.2001122 L17.5814904,18.87328 L16.1273302,17.4183562 L16.0823515,17.3785153 C15.8794349,17.2197125 15.5776577,17.2407189 15.3818377,17.436539 C15.1709545,17.6474221 15.1628139,17.9811905 15.3636549,18.1820315 L15.3636549,18.1820315 L17.1819295,20.0003061 L17.2269082,20.0401471 C17.4298248,20.1989498 17.731602,20.1779434 17.9274221,19.9821234 L17.9274221,19.9821234 L20.9821234,16.9274221 L21.0242071,16.8804452 C21.1931032,16.669536 21.1868014,16.3684248 21.0003061,16.1819295 L21.0003061,16.1819295 Z" id="形状结合" fill="#FF8057"></path>
+            </g>
+        </g>
+    </g>
+</svg>

+ 20 - 0
src/views/coursewarePlay/image/icon-loop.svg

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>切片</title>
+    <defs>
+        <path d="M19.7272413,6.75 C22.3505939,11.2937799 20.7937799,17.1038888 16.25,19.7272413 C11.7062201,22.3505939 5.89611123,20.7937799 3.27275866,16.25 C2.99661629,15.7717074 3.16049144,15.160117 3.63878407,14.8839746 C4.11707669,14.6078322 4.7286671,14.7717074 5.00480947,15.25 C7.07587728,18.8371947 11.6628053,20.0662583 15.25,17.9951905 C18.8371947,15.9241227 20.0662583,11.3371947 17.9951905,7.75 C15.9241227,4.16280532 11.3371947,2.93374166 7.75,5.00480947 C6.85788041,5.51987496 6.09738693,6.19866524 5.49784407,6.99904787 L7,7 C7.51283584,7 7.93550716,7.38604019 7.99327227,7.88337887 L8,8 C8,8.51283584 7.61395981,8.93550716 7.11662113,8.99327227 L7,9 L3,9 C2.48716416,9 2.06449284,8.61395981 2.00672773,8.11662113 L2,8 L2,4 C2,3.44771525 2.44771525,3 3,3 C3.51283584,3 3.93550716,3.38604019 3.99327227,3.88337887 L4,4 L3.99919549,5.66623947 C4.74283972,4.70951337 5.67119653,3.89560614 6.75,3.27275866 C11.2937799,0.649406102 17.1038888,2.20622008 19.7272413,6.75 Z M9,8 C9,7.22270552 9.84797124,6.74259237 10.5144958,7.14250707 L10.5144958,7.14250707 L15.5144958,10.1425071 C16.1618347,10.5309105 16.1618347,11.4690895 15.5144958,11.8574929 L15.5144958,11.8574929 L10.5144958,14.8574929 C9.84797124,15.2574076 9,14.7772945 9,14 L9,14 Z M11.001,9.766 L11.001,12.233 L13.057,11 L11.001,9.766 Z" id="path-1"></path>
+        <filter x="-31.6%" y="-31.6%" width="163.2%" height="163.1%" filterUnits="objectBoundingBox" id="filter-2">
+            <feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
+            <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
+            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.15 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
+        </filter>
+    </defs>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="课件播放(控件)" transform="translate(-42.000000, -246.000000)" fill-rule="nonzero">
+            <g id="形状结合" transform="translate(42.000000, 246.000000)">
+                <use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
+                <use fill="#FFFFFF" xlink:href="#path-1"></use>
+            </g>
+        </g>
+    </g>
+</svg>

+ 32 - 0
src/views/coursewarePlay/image/icon-pause.svg

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>切片</title>
+    <defs>
+        <rect id="path-1" x="4" y="3" width="5" height="18" rx="2"></rect>
+        <filter x="-120.0%" y="-33.3%" width="340.0%" height="166.7%" filterUnits="objectBoundingBox" id="filter-2">
+            <feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
+            <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
+            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.15 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
+        </filter>
+        <rect id="path-3" x="15" y="3" width="5" height="18" rx="2"></rect>
+        <filter x="-120.0%" y="-33.3%" width="340.0%" height="166.7%" filterUnits="objectBoundingBox" id="filter-4">
+            <feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
+            <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
+            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.15 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
+        </filter>
+    </defs>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="课件播放(控件)" transform="translate(-42.000000, -46.000000)" fill-rule="nonzero">
+            <g id="播放" transform="translate(42.000000, 46.000000)">
+                <g id="矩形">
+                    <use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
+                    <use fill="#FFFFFF" xlink:href="#path-1"></use>
+                </g>
+                <g id="矩形备份">
+                    <use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-3"></use>
+                    <use fill="#FFFFFF" xlink:href="#path-3"></use>
+                </g>
+            </g>
+        </g>
+    </g>
+</svg>

+ 22 - 0
src/views/coursewarePlay/image/icon-play.svg

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>切片</title>
+    <defs>
+        <path d="M15.2349141,5.27497835 L22.6793243,18.2549758 C23.228861,19.2131423 22.8976011,20.4353773 21.9394345,20.9849141 C21.6365821,21.1586088 21.293537,21.25 20.9444103,21.25 L6.05558972,21.25 C4.95102022,21.25 4.05558972,20.3545695 4.05558972,19.25 C4.05558972,18.9008732 4.14698087,18.5578282 4.32067566,18.2549758 L11.7650859,5.27497835 C12.3146227,4.31681177 13.5368577,3.98555182 14.4950242,4.53508853 C14.8029434,4.7116892 15.0583134,4.96705923 15.2349141,5.27497835 Z" id="path-1"></path>
+        <filter x="-27.5%" y="-31.6%" width="155.1%" height="163.2%" filterUnits="objectBoundingBox" id="filter-2">
+            <feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
+            <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
+            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.15 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
+        </filter>
+    </defs>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="课件播放(控件)" transform="translate(-42.000000, -83.000000)" fill-rule="nonzero">
+            <g id="播放备份" transform="translate(42.000000, 83.000000)">
+                <g id="三角形" transform="translate(13.500000, 11.750000) rotate(-270.000000) translate(-13.500000, -11.750000) ">
+                    <use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
+                    <use fill="#FFFFFF" xlink:href="#path-1"></use>
+                </g>
+            </g>
+        </g>
+    </g>
+</svg>

+ 67 - 36
src/views/coursewarePlay/index.module.less

@@ -3,13 +3,21 @@
   height: 100vh;
   background-color: rgba(89, 98, 126, 0.2);
 }
+.playModel{
+  position: absolute;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    box-shadow: inset 0px 0px 164px 0px rgba(0,0,0,1);
+}
 .headerContainer {
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   z-index: 1;
-  padding: 10px 10px 0 10px;
+  padding: 10px;
   display: flex;
   align-items: center;
 }
@@ -27,39 +35,8 @@
   flex: 1;
   display: flex;
   justify-content: center;
-  margin-left: 10px;
-  .menuLine {
-    position: absolute;
-    left: 0;
-    top: 0;
-    height: 100%;
-    z-index: -1;
-    background: #ff8057;
-    transition: width 0.3s;
-  }
-  :global {
-    .van-tabs__content,
-    .van-tabs__line {
-      display: none;
-    }
-    .van-tabs__wrap {
-      height: 26px;
-    }
-    .van-tabs__nav {
-      padding: 0;
-      background: rgba(255, 128, 87, 0.5);
-      .van-tab {
-        color: #fff;
-        font-size: 14px;
-      }
-      .van-tab:not(:first-child) {
-        // border-left: 1px solid #fff;
-      }
-      .van-tab.van-tab--active {
-        background: var(--van-primary);
-      }
-    }
-  }
+  font-size: 12px;
+  color: #fff;
 }
 .tabsContent {
   width: 100vw;
@@ -140,8 +117,34 @@
     opacity: 0.8;
   }
 }
+.bottomFixedContainer{
+  position: fixed;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  .time{
+    display: flex;
+    justify-content: space-between;
+    color: #fff;
+    font-size: 10px;
+    padding: 4px 10px;
+  }
+  .actions{
+    display: flex;
+    justify-content: space-between;
+    color: #fff;
+    font-size: 12px;
+    padding: 4px 10px 18px 10px;
+    :global{
+      .van-icon{
+        font-size: 20px;
+        margin-right: 14px;
+      }
+    }
+  }
+}
 .popup {
-  background: transparent;
+  background: rgba(0, 0, 0, 0.5);
 }
 .overlayClass {
   --van-overlay-background: transparent;
@@ -151,9 +154,37 @@
   .top-leave-active {
     transition: transform 0.5s;
   }
-
   .top-enter-from,
   .top-leave-to {
     transform: translateY(-100%);
   }
+
+  .left-enter-active,
+  .left-leave-active {
+    transition: all 0.5s;
+  }
+  .left-enter-from,
+  .left-leave-to {
+    left: -60px;
+  }
+
+  .right-enter-active,
+  .right-leave-active {
+    transition: all 0.5s;
+  }
+
+  .right-enter-from,
+  .right-leave-to {
+    right: -60px;
+  }
+
+  .bottom-enter-active,
+  .bottom-leave-active {
+    transition: transform 0.5s;
+  }
+
+  .bottom-enter-from,
+  .bottom-leave-to {
+    transform: translateY(100%);
+  }
 }

+ 191 - 129
src/views/coursewarePlay/index.tsx

@@ -1,4 +1,4 @@
-import { Button, Icon, Popup, Swipe, SwipeItem, Tab, Tabs } from 'vant'
+import { Button, Icon, Popup, Slider, Swipe, SwipeItem, Tab, Tabs } from 'vant'
 import {
   defineComponent,
   onMounted,
@@ -7,7 +7,8 @@ import {
   onUnmounted,
   ref,
   watch,
-  Transition
+  Transition,
+  computed
 } from 'vue'
 import iconBack from './image/back.svg'
 import styles from './index.module.less'
@@ -16,7 +17,7 @@ import 'plyr/dist/plyr.css'
 import request from '@/helpers/request'
 import { state } from '@/state'
 import { useRoute } from 'vue-router'
-import { postMessage } from '@/helpers/native-message'
+import { listenerMessage, postMessage } from '@/helpers/native-message'
 import MusicScore from './component/musicScore'
 import iconMenu from './image/icon-menu.svg'
 import iconDian from './image/icon-dian.svg'
@@ -46,15 +47,41 @@ export default defineComponent({
         }
       })
     }
+    handleInit()
 
     const route = useRoute()
     const data = reactive({
       detail: null,
       active: '',
+      itemActive: '',
       knowledgePointList: [] as any,
       showHead: true,
       players: [] as any
     })
+    const activeData = reactive({
+      model: true, // 遮罩
+      currentTime: 10
+    })
+    const itemList = computed(() => {
+      const list: any = []
+      for (let i = 0; i < data.knowledgePointList.length; i++) {
+        const item = data.knowledgePointList[i]
+        for (let j = 0; j < item.materialList.length; j++) {
+          const material = item.materialList[j]
+          if (popupData.itemActive === '') {
+            popupData.tabActive = material.knowledgePointId
+            popupData.tabName = item.name
+            popupData.itemActive = material.id
+            popupData.itemName = material.name
+          }
+          list.push({
+            ...material
+          })
+        }
+      }
+      // console.log('🚀 ~ list', list)
+      return list
+    })
     const getDetail = async () => {
       try {
         const res: any = await request.get(
@@ -69,12 +96,7 @@ export default defineComponent({
             return n
           })
         }
-        console.log('数据加载完成')
       } catch (error) {}
-      nextTick(() => {
-        console.log('开始加载视频')
-        videoInit()
-      })
     }
     const videoInit = () => {
       console.log(document.querySelectorAll('.player'))
@@ -114,9 +136,32 @@ export default defineComponent({
       })
       console.log('🚀 ~ player', data.players)
     }
+    const testFile = ref('')
     onMounted(() => {
-      handleInit()
+      // const o = new ActiveXObject("wscript.shell")
       getDetail()
+      postMessage(
+        {
+          api: 'getCourseFilePath',
+          content: {
+            url: 'https://daya.ks3-cn-beijing.ksyuncs.com/01/1672976208474.jpg',
+            materialId: '1610610237357969409',
+            updateTime: '2023-01-04 20:12:58',
+            type: 'VIDEO' // SONG VIDEO IMAGE
+          }
+        },
+        (res) => {
+          if (res?.content) {
+            testFile.value = 'customScheme://' + res.content.localPath
+            fetch(testFile.value)
+          }
+        }
+      )
+    })
+    listenerMessage('getCourseFilePath', (res) => {
+      if (res?.content) {
+        testFile.value = res.content.localPath
+      }
     })
     // 返回
     const goback = () => {
@@ -157,27 +202,28 @@ export default defineComponent({
 
     const popupData = reactive({
       open: false,
-      active: ''
+      activeIndex: 0,
+      tabActive: '',
+      tabName: '',
+      itemActive: '',
+      itemName: ''
     })
-    // 监听切换
-    watch(
-      () => popupData.active,
-      () => {
-        console.log(data.active, '监听切换')
-        handleChange()
-        const knowledge = data.knowledgePointList.find((n: any) => n.id === data.active)
-        if (knowledge && knowledge?.materialList[knowledge.index]) {
-          // 如果是曲谱,隐藏头部
-          if (knowledge.materialList[knowledge.index]?.type === 'SONG') {
-            data.showHead = false
-            return
-          }
-        }
-        data.showHead = true
-      }
-    )
+    // 切换素材
+    const toggleMaterial = () => {
+      const index = itemList.value.findIndex((n: any) => n.id == popupData.itemActive)
+      popupData.activeIndex = index
+      console.log('🚀 ~ popupData', popupData.activeIndex)
+    }
+    // 上一个知识点, 下一个知识点
+    const handlePreAndNext = (type: string) => {
+      console.log(popupData.tabActive)
+      const tabIndex = data.knowledgePointList.findIndex((n: any) => n.id == popupData.tabActive)
+      const itemIndex = itemList.value.findIndex((n: any) => n.id == popupData.itemActive)
+      
+      console.log("🚀 ~ tab", tabIndex, itemIndex)
+    }
 
-    // 去点名
+    // 去点名,签退
     const gotoRollCall = (pageTag: string) => {
       postMessage({
         api: 'open_app_page',
@@ -191,130 +237,146 @@ export default defineComponent({
     }
     return () => (
       <div class={styles.coursewarePlay}>
+        <Swipe
+          style={{ height: '100vh' }}
+          showIndicators={false}
+          loop={false}
+          initialSwipe={popupData.activeIndex}
+          vertical
+          lazyRender={true}
+          onChange={(val: any) => {
+            // item.index = val
+            // popupData.itemActive = `${item.id}-${item?.materialList?.[item.index]?.id}`
+          }}
+        >
+          {itemList.value.map((m: any) => {
+            return (
+              <SwipeItem>
+                {m.type === 'VIDEO' ? (
+                  <div class={styles.videoItem}>
+                    <video class="player">
+                      <source src={m.content} type="video/mp4" />
+                    </video>
+                  </div>
+                ) : m.type === 'IMG' ? (
+                  <div class={styles.imgItem}>
+                    <img src={m.content} />
+                  </div>
+                ) : (
+                  <div class={styles.songItem}>
+                    <MusicScore music={m} />
+                  </div>
+                )}
+              </SwipeItem>
+            )
+          })}
+        </Swipe>
+        <div
+          class={styles.playModel}
+          onClick={() => {
+            activeData.model = !activeData.model
+          }}
+        ></div>
         <Transition name="top">
-          {data.showHead && (
+          {activeData.model && (
             <div class={styles.headerContainer}>
               <div class={styles.backBtn} onClick={() => goback()}>
                 <Icon name={iconBack} />
                 返回
               </div>
-              <div class={styles.menu}>
-                <Tabs
-                  v-model:active={data.active}
-                  ellipsis={false}
-                  onChange={() => {
-                    const knowledge = data.knowledgePointList.find((_: any) => _.id === data.active)
-                    popupData.active = `${data.active}-${
-                      knowledge?.materialList?.[knowledge.index]?.id
-                    }`
-                  }}
-                >
-                  {{
-                    default: () => {
-                      return data.knowledgePointList.map((n: any) => {
-                        return <Tab title={n.name} name={n.id}></Tab>
-                      })
-                    }
-                    // 'nav-right': () => <div style={{width: '40%'}} class={styles.menuLine}></div>
-                  }}
-                </Tabs>
+              <div class={styles.menu}>{popupData.tabName}</div>
+            </div>
+          )}
+        </Transition>
+
+        <Transition name="right">
+          {activeData.model && (
+            <div class={styles.rightFixedBtns}>
+              <div class={styles.fullBtn} onClick={() => (popupData.open = true)}>
+                <img src={iconMenu} />
+                <span>知识点</span>
               </div>
+              {route.query.courseId && (
+                <>
+                  <div
+                    class={[styles.fullBtn, styles.point]}
+                    onClick={() => gotoRollCall('student_roll_call')}
+                  >
+                    <img src={iconDian} />
+                    <span>点名</span>
+                  </div>
+                  <div class={styles.fullBtn} onClick={() => gotoRollCall('sign_out')}>
+                    <img src={iconPoint} />
+                    <span>签退</span>
+                  </div>
+                </>
+              )}
             </div>
           )}
         </Transition>
 
-        <Tabs class={styles.tabsContent} animated lazyRender={false} v-model:active={data.active}>
-          {data.knowledgePointList.map((item: any) => {
-            return (
-              <Tab name={item.id}>
-                <Swipe
-                  style={{ height: '100vh' }}
-                  showIndicators={false}
-                  loop={false}
-                  initialSwipe={item.index}
-                  vertical
-                  lazyRender={false}
-                  onChange={(val: any) => {
-                    item.index = val
-                    popupData.active = `${item.id}-${item?.materialList?.[item.index]?.id}`
-                  }}
-                >
-                  {Array.isArray(item?.materialList) &&
-                    item.materialList.map((m: any) => {
-                      if (popupData.active === '') {
-                        popupData.active = `${item.id}-${m.id}`
-                        console.log('🚀 ~ popupData', popupData)
-                      }
-                      return (
-                        <SwipeItem>
-                          {m.type === 'VIDEO' ? (
-                            <div class={styles.videoItem}>
-                              <video class="player" controls>
-                                <source src={m.content} type="video/mp4" />
-                              </video>
-                            </div>
-                          ) : m.type === 'IMG' ? (
-                            <div class={styles.imgItem}>
-                              <img src={m.content} />
-                            </div>
-                          ) : (
-                            <div class={styles.songItem}>
-                              <MusicScore music={m} />
-                            </div>
-                          )}
-                        </SwipeItem>
-                      )
-                    })}
-                </Swipe>
-              </Tab>
-            )
-          })}
-        </Tabs>
-        <div class={styles.rightFixedBtns}>
-          <div class={styles.fullBtn} onClick={() => (popupData.open = true)}>
-            <img src={iconMenu} />
-            <span>知识点</span>
-          </div>
-          {route.query.courseId && (
-            <>
-              <div
-                class={[styles.fullBtn, styles.point]}
-                onClick={() => gotoRollCall('student_roll_call')}
-              >
-                <img src={iconDian} />
-                <span>点名</span>
+        <Transition name="left">
+          {activeData.model && (
+            <div class={styles.leftFixedBtns}>
+              <div class={[styles.fullBtn, styles.prePoint]} onClick={() => handlePreAndNext('up')}>
+                <span style={{ textAlign: 'center' }}>
+                  上一
+                  <br />
+                  知识点
+                </span>
               </div>
-              <div class={styles.fullBtn} onClick={() => gotoRollCall('sign_out')}>
-                <img src={iconPoint} />
-                <span>签退</span>
+              <div class={styles.fullBtn} onClick={() => handlePreAndNext('down')}>
+                <span style={{ textAlign: 'center' }}>
+                  下一
+                  <br />
+                  知识点
+                </span>
               </div>
-            </>
+            </div>
           )}
-        </div>
-        <div class={styles.leftFixedBtns}>
-          <div class={[styles.fullBtn , styles.prePoint]} >
-            <span style={{textAlign: 'center'}}>上一<br />知识点</span>
-          </div>
-          <div class={styles.fullBtn} >
-            <span style={{textAlign: 'center'}}>下一<br />知识点</span>
-          </div>
-        </div>
+        </Transition>
+
+        <Transition name="bottom">
+          {activeData.model && (
+            <div class={styles.bottomFixedContainer}>
+              <div class={styles.time}>
+                <span>03:12</span>
+                <span>10:12</span>
+              </div>
+              <Slider
+                buttonSize={16}
+                style={{ margin: '8px 0' }}
+                v-model:modelValue={activeData.currentTime}
+                min={0}
+                max={100}
+              />
+              <div class={styles.actions}>
+                <div>
+                  <Icon name="play-circle" />
+                  <Icon name="pause-circle" />
+                </div>
+                <div>长笛的呼吸练习</div>
+              </div>
+            </div>
+          )}
+        </Transition>
         <Popup
           class={styles.popup}
           overlayClass={styles.overlayClass}
-          position="left"
+          position="right"
+          round
           v-model:show={popupData.open}
         >
           <Points
             data={data.knowledgePointList}
-            active={popupData.active}
+            tabActive={popupData.tabActive}
+            itemActive={popupData.itemActive}
             onHandleSelect={(res: any) => {
-              data.active = res.id
-              const knowledge = data.knowledgePointList.find((n: any) => n.id === res.id)
-              // console.log(res,knowledge)
-              knowledge && (knowledge.index = res.index)
-              popupData.active = res.active
+              // console.log(res)
+              popupData.tabActive = res.tabActive
+              popupData.itemActive = res.itemActive
               popupData.open = false
+              toggleMaterial()
             }}
           />
         </Popup>