Browse Source

修改显示

lex 1 year ago
parent
commit
1af75d947a
1 changed files with 11 additions and 3 deletions
  1. 11 3
      src/views/co-ai/index.tsx

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

@@ -136,10 +136,19 @@ export default defineComponent({
         data.showVip = true;
         return;
       }
+      // 默认进页面显示对应的曲谱
+      const lineType = _actions.value.map(item => {
+        if (item.value === 'first') {
+          return 'firstTone';
+        } else if (item.value === 'fixed') {
+          return 'fixedTone';
+        } else {
+          return '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 +172,6 @@ export default defineComponent({
         })
           .then(async canvas => {
             var dataURL = canvas.toDataURL('image/png', 1); //可选取多种模式
-            // console.log('🚀 ~ dataURL:', dataURL);
             setTimeout(() => {
               showToast('已保存到相册');
             }, 500);