浏览代码

Merge branch 'feature-3.8' of http://git.dayaedu.com/liushengqiang/classroom-app into feature-3.8

TIANYONG 1 年之前
父节点
当前提交
94f741eeac
共有 3 个文件被更改,包括 25 次插入6 次删除
  1. 6 2
      src/views/courseware-play/index.tsx
  2. 2 2
      src/views/tempo-practice/index.module.less
  3. 17 2
      src/views/tempo-practice/index.tsx

+ 6 - 2
src/views/courseware-play/index.tsx

@@ -53,7 +53,7 @@ import Theory from './component/theory';
 import InstrumentInfo from './component/instrument-info';
 import InstrumentInfo from './component/instrument-info';
 // import TempoPractice from '../../views/tempo-practice';
 // import TempoPractice from '../../views/tempo-practice';
 import SelectCoursewarePop from '@/components/select-courseware-pop';
 import SelectCoursewarePop from '@/components/select-courseware-pop';
-import { debounce } from "../../helpers/utils"
+import { debounce } from '../../helpers/utils';
 import TempoItem from './component/tempo-item';
 import TempoItem from './component/tempo-item';
 
 
 export default defineComponent({
 export default defineComponent({
@@ -323,6 +323,10 @@ export default defineComponent({
         clearInterval(activeData.timer);
         clearInterval(activeData.timer);
         activeData.model = !ev.data.state;
         activeData.model = !ev.data.state;
       }
       }
+
+      if (ev.data?.api === 'clickTempo') {
+        setModelOpen();
+      }
     };
     };
 
 
     onMounted(() => {
     onMounted(() => {
@@ -880,7 +884,7 @@ export default defineComponent({
 
 
     // 加载新的章节里的课件
     // 加载新的章节里的课件
     const loadNewCourseware = async (item: any) => {
     const loadNewCourseware = async (item: any) => {
-      if( debounceSkip.value ) return;
+      if (debounceSkip.value) return;
       debounceSkip.value = true;
       debounceSkip.value = true;
       data.itemList = [];
       data.itemList = [];
       loadingClass.value = true;
       loadingClass.value = true;

+ 2 - 2
src/views/tempo-practice/index.module.less

@@ -103,6 +103,7 @@
   flex: 1 auto;
   flex: 1 auto;
   flex-wrap: wrap;
   flex-wrap: wrap;
   gap: 15px 0;
   gap: 15px 0;
+  // margin-bottom: 15px;
   max-width: 900px;
   max-width: 900px;
   margin: 0 auto;
   margin: 0 auto;
 }
 }
@@ -111,6 +112,7 @@
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   justify-content: center;
   justify-content: center;
+  // margin-bottom: 15px;
 
 
   &.small {
   &.small {
     width: 50%;
     width: 50%;
@@ -133,8 +135,6 @@
       cursor: pointer;
       cursor: pointer;
       margin: 0 7px;
       margin: 0 7px;
 
 
-
-
       &::before,
       &::before,
       &::after {
       &::after {
         width: 19px;
         width: 19px;

+ 17 - 2
src/views/tempo-practice/index.tsx

@@ -225,6 +225,14 @@ export default defineComponent({
     });
     });
     return () => (
     return () => (
       <div
       <div
+        onClick={() => {
+          window.parent.postMessage(
+            {
+              api: 'clickTempo'
+            },
+            '*'
+          );
+        }}
         class={[
         class={[
           styles.tempoPractice,
           styles.tempoPractice,
           state.win === 'pc' ? styles.pc : '',
           state.win === 'pc' ? styles.pc : '',
@@ -268,7 +276,10 @@ export default defineComponent({
                 ]}>
                 ]}>
                 {item.map((child: any, jIndex: number) => (
                 {item.map((child: any, jIndex: number) => (
                   <div
                   <div
-                    class={[styles.beat, child.selected ? styles.active : '']}>
+                    class={[styles.beat, child.selected ? styles.active : '']}
+                    onClick={(e: any) => {
+                      e.stopPropagation();
+                    }}>
                     <div class={styles.direction}>
                     <div class={styles.direction}>
                       <div
                       <div
                         class={styles.up}
                         class={styles.up}
@@ -309,7 +320,11 @@ export default defineComponent({
           </div>
           </div>
         </div>
         </div>
 
 
-        <div class={styles.footer}>
+        <div
+          class={styles.footer}
+          onClick={(e: any) => {
+            e.stopPropagation();
+          }}>
           {/* 播放 */}
           {/* 播放 */}
           <div class={styles.play} onClick={handlePlay}>
           <div class={styles.play} onClick={handlePlay}>
             {setting.playState === 'pause' ? (
             {setting.playState === 'pause' ? (