Browse Source

Update index.tsx

lex 1 year ago
parent
commit
2f317389eb
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/views/courseware-play/component/listen-item/index.tsx

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

@@ -77,9 +77,13 @@ export default defineComponent({
 
     const Authorization = storage.get(ACCESS_TOKEN);
     // const src = `${location.origin}/classroom-app/#/tempo-practice?dataJson=${props.dataJson}&Authorization=${Authorization}&modeType=courseware`;
-    const src = `${vaildMusicScoreUrl()}/instrument/#/view-figner?Authorization=${Authorization}&code=${
+    let src = `${vaildMusicScoreUrl()}/instrument/#/view-figner?Authorization=${Authorization}&code=${
       props.item.content
-    }&type=listenMode`;
+    }&type=listenMode&linkSource=class`;
+    if (/(localhost|192)/.test(location.host)) {
+      src = `http://localhost:3000/instrument.html#/view-figner?Authorization=${Authorization}&code=${props.item.content}&type=listenMode&linkSource=class`;
+    }
+
     return () => (
       <div class={styles.tempoItem}>
         <iframe