Pārlūkot izejas kodu

Merge branch 'iteration-20231114'

lex 1 gadu atpakaļ
vecāks
revīzija
d49112b878
1 mainītis faili ar 10 papildinājumiem un 3 dzēšanām
  1. 10 3
      src/views/co-ai/index.tsx

+ 10 - 3
src/views/co-ai/index.tsx

@@ -136,10 +136,18 @@ export default defineComponent({
         data.showVip = true;
         return;
       }
+      // 默认进页面显示对应的曲谱
+      let lineType = 'staff';
+      if (data.showMusicImg === 'first') {
+        lineType = 'firstTone';
+      } else if (data.showMusicImg === 'fixed') {
+        lineType = 'fixedTone';
+      } else if (data.showMusicImg === 'staff') {
+        lineType = 'staff';
+      }
       let src = `${location.origin}/instrument?id=${
         data.musics[data.musicIndex]?.id
-      }&showGuide=true`;
-      console.log(src);
+      }&musicRenderType=${lineType}&showGuide=true`;
       postMessage({
         api: 'openAccompanyWebView',
         content: {
@@ -163,7 +171,6 @@ export default defineComponent({
         })
           .then(async canvas => {
             var dataURL = canvas.toDataURL('image/png', 1); //可选取多种模式
-            // console.log('🚀 ~ dataURL:', dataURL);
             setTimeout(() => {
               showToast('已保存到相册');
             }, 500);