Explorar o código

feat: 课件跳转节奏练习

TIANYONG hai 1 ano
pai
achega
48e21d18be
Modificáronse 2 ficheiros con 31 adicións e 18 borrados
  1. 4 1
      src/views/courseware-play/index.tsx
  2. 27 17
      src/views/tempo-practice/index.tsx

+ 4 - 1
src/views/courseware-play/index.tsx

@@ -1015,7 +1015,10 @@ export default defineComponent({
 
                     {/* 新增:RHYTHM:节奏练习,THEORY:乐理知识,MUSIC_WIKI:名曲鉴赏 INSTRUMENT:乐器 MUSICIAN:音乐家 资源类型 */}
                     {m.type === 'RHYTHM' && 
-                      <TempoPractice dataJson={m?.dataJson ? JSON.parse(m?.dataJson) : {}} />
+                      <TempoPractice 
+                        dataJson={m?.dataJson ? JSON.parse(m?.dataJson) : {}} 
+                        modeType={'courseware'}
+                      />
                     }
                     {m.type === 'THEORY' && (
                       <Theory id={m.bizId} />

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

@@ -33,9 +33,13 @@ export default defineComponent({
     dataJson: {
       type: Object,
       default: () => {}
-    } 
+    },
+    modeType : {
+      type: String,
+      default: ''
+    }
   },
-  setup() {
+  setup(props) {
     const route = useRoute();
     const state = reactive({
       platform: route.query.platform, // microapp 老师端应用里面打开单独处理返回逻辑
@@ -121,24 +125,30 @@ export default defineComponent({
     return () => (
       <div class={[styles.tempoPractice, state.win === 'pc' ? styles.pc : '']}>
         <div class={styles.head}>
-          <div
-            class={styles.back}
-            onClick={goback}
-            style={{ cursor: 'pointer' }}>
-            <img src={icon_back} />
-          </div>
+          {
+            props.modeType !== 'courseware' && 
+            <div
+              class={styles.back}
+              onClick={goback}
+              style={{ cursor: 'pointer' }}>
+              <img src={icon_back} />
+            </div>
+          }
           <div class={styles.title}>
             <img src={icon_title} />
           </div>
-          <div
-            class={styles.back}
-            style={{ cursor: 'pointer' }}
-            onClick={() => {
-              handleStop();
-              state.settingStatus = true;
-            }}>
-            <img src={icon_setting} />
-          </div>
+          {
+            props.modeType !== 'courseware' && 
+            <div
+              class={styles.back}
+              style={{ cursor: 'pointer' }}
+              onClick={() => {
+                handleStop();
+                state.settingStatus = true;
+              }}>
+              <img src={icon_setting} />
+            </div>            
+          }
         </div>
 
         <div class={styles.conCon}>