Browse Source

Merge branch 'hotfix-11-11' into gym-test

TIANYONG 3 months ago
parent
commit
42e7bc7fd7

+ 10 - 0
dist/instrument.html

@@ -41,8 +41,13 @@
       })
     }
   </script>
+<<<<<<< HEAD
   <script type="module" crossorigin src="./js/instrument-009bf74a.js"></script>
   <link rel="stylesheet" href="./css/instrument-7508600c.css">
+=======
+  <script type="module" crossorigin src="./js/instrument-e10b8181.js"></script>
+  <link rel="stylesheet" href="./css/instrument-b327992e.css">
+>>>>>>> hotfix-11-11
   <script type="module">import.meta.url;import("_").catch(()=>1);async function* g(){};window.__vite_is_modern_browser=true;</script>
   <script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
 </head>
@@ -65,8 +70,13 @@
     var vConsole = new window.VConsole();
   </script>  
   <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
+<<<<<<< HEAD
   <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-55a61f59.js"></script>
   <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/instrument-legacy-52e6efc1.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+=======
+  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-b653339e.js"></script>
+  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/instrument-legacy-b493ffbb.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+>>>>>>> hotfix-11-11
 </body>
 
 </html>

+ 4 - 0
dist/js/index-1cba08ab.js

@@ -1 +1,5 @@
+<<<<<<<< HEAD:dist/js/index-1cba08ab.js
 import{d as i,g as l,r as d,E as e,o as r,s as c,b as s,M as u}from"./instrument-009bf74a.js";const f="_skeleton_vtlsh_1",m="_detail_vtlsh_12",p="_container_vtlsh_20",a={skeleton:f,detail:m,container:p},y=i({name:"music-list",setup(){const n=l(),t=d({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:e.staff,base64:""},{state:!1,name:"首调",type:e.firstTone,base64:""},{state:!1,name:"固定调",type:e.fixedTone,base64:""}]});r(()=>{window.appName="colexiu",c.xmlUrl=n.xmlUrl,t.isLoading=!1});const o=async()=>{console.log("渲染完成")};return()=>s("div",{class:a.detail},[s("div",{id:"scrollContainer",class:[a.container,"hideCursor"]},[!t.isLoading&&s(u,{onRendered:o},null)])])}});export{y as default};
+========
+import{d as i,g as l,r as d,E as e,o as r,s as c,b as s,M as u}from"./instrument-e10b8181.js";const f="_skeleton_vtlsh_1",m="_detail_vtlsh_12",p="_container_vtlsh_20",a={skeleton:f,detail:m,container:p},y=i({name:"music-list",setup(){const n=l(),t=d({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:e.staff,base64:""},{state:!1,name:"首调",type:e.firstTone,base64:""},{state:!1,name:"固定调",type:e.fixedTone,base64:""}]});r(()=>{window.appName="colexiu",c.xmlUrl=n.xmlUrl,t.isLoading=!1});const o=async()=>{console.log("渲染完成")};return()=>s("div",{class:a.detail},[s("div",{id:"scrollContainer",class:[a.container,"hideCursor"]},[!t.isLoading&&s(u,{onRendered:o},null)])])}});export{y as default};
+>>>>>>>> hotfix-11-11:dist/js/index-98612534.js

+ 5 - 0
dist/js/index-98612534.js

@@ -0,0 +1,5 @@
+<<<<<<<< HEAD:dist/js/index-1cba08ab.js
+import{d as i,g as l,r as d,E as e,o as r,s as c,b as s,M as u}from"./instrument-009bf74a.js";const f="_skeleton_vtlsh_1",m="_detail_vtlsh_12",p="_container_vtlsh_20",a={skeleton:f,detail:m,container:p},y=i({name:"music-list",setup(){const n=l(),t=d({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:e.staff,base64:""},{state:!1,name:"首调",type:e.firstTone,base64:""},{state:!1,name:"固定调",type:e.fixedTone,base64:""}]});r(()=>{window.appName="colexiu",c.xmlUrl=n.xmlUrl,t.isLoading=!1});const o=async()=>{console.log("渲染完成")};return()=>s("div",{class:a.detail},[s("div",{id:"scrollContainer",class:[a.container,"hideCursor"]},[!t.isLoading&&s(u,{onRendered:o},null)])])}});export{y as default};
+========
+import{d as i,g as l,r as d,E as e,o as r,s as c,b as s,M as u}from"./instrument-e10b8181.js";const f="_skeleton_vtlsh_1",m="_detail_vtlsh_12",p="_container_vtlsh_20",a={skeleton:f,detail:m,container:p},y=i({name:"music-list",setup(){const n=l(),t=d({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:e.staff,base64:""},{state:!1,name:"首调",type:e.firstTone,base64:""},{state:!1,name:"固定调",type:e.fixedTone,base64:""}]});r(()=>{window.appName="colexiu",c.xmlUrl=n.xmlUrl,t.isLoading=!1});const o=async()=>{console.log("渲染完成")};return()=>s("div",{class:a.detail},[s("div",{id:"scrollContainer",class:[a.container,"hideCursor"]},[!t.isLoading&&s(u,{onRendered:o},null)])])}});export{y as default};
+>>>>>>>> hotfix-11-11:dist/js/index-98612534.js

File diff suppressed because it is too large
+ 1 - 0
dist/js/index-a880591f.js


File diff suppressed because it is too large
+ 1 - 0
dist/js/index-acb8a89e.js


File diff suppressed because it is too large
+ 1 - 0
dist/js/index-b18c1417.js


File diff suppressed because it is too large
+ 1 - 0
dist/js/index-c46b557b.js


File diff suppressed because it is too large
+ 1 - 0
dist/js/index-c91143f9.js


File diff suppressed because it is too large
+ 1 - 0
dist/js/index-fb2ba382.js


File diff suppressed because it is too large
+ 1 - 0
dist/js/index-legacy-06a5aa41.js


File diff suppressed because it is too large
+ 1 - 0
dist/js/index-legacy-1ebdc4c4.js


File diff suppressed because it is too large
+ 1 - 0
dist/js/index-legacy-2eb3d340.js


+ 5 - 0
dist/js/index-legacy-5816d614.js

@@ -0,0 +1,5 @@
+<<<<<<<< HEAD:dist/js/index-legacy-7537d87e.js
+System.register(["./instrument-legacy-52e6efc1.js"],(function(e,t){"use strict";var i,n,a,o,r,s,l,d,c=document.createElement("style");return c.textContent="._skeleton_vtlsh_1{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:.53333rem .8rem;background-color:#fff;z-index:1000;--van-skeleton-paragraph-height: .8rem}._detail_vtlsh_12{width:100vw;height:100vh;overflow:hidden;overflow-y:auto;--header-height: 1.65333rem;background:var(--container-background)}._detail_vtlsh_12 ._container_vtlsh_20{margin:0 .26667rem;border-radius:.26667rem}._detail_vtlsh_12 #musicAndSelection{overflow:initial!important;height:initial!important;max-height:initial!important}\n",document.head.appendChild(c),{setters:[e=>{i=e.d,n=e.g,a=e.r,o=e.E,r=e.o,s=e.s,l=e.b,d=e.M}],execute:function(){const t="_detail_vtlsh_12",c="_container_vtlsh_20";e("default",i({name:"music-list",setup(){const e=n(),i=a({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:o.staff,base64:""},{state:!1,name:"首调",type:o.firstTone,base64:""},{state:!1,name:"固定调",type:o.fixedTone,base64:""}]});r((()=>{window.appName="colexiu",s.xmlUrl=e.xmlUrl,i.isLoading=!1}));const h=async()=>{console.log("渲染完成")};return()=>l("div",{class:t},[l("div",{id:"scrollContainer",class:[c,"hideCursor"]},[!i.isLoading&&l(d,{onRendered:h},null)])])}}))}}}));
+========
+System.register(["./instrument-legacy-b493ffbb.js"],(function(e,t){"use strict";var i,n,a,o,r,s,l,d,c=document.createElement("style");return c.textContent="._skeleton_vtlsh_1{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:.53333rem .8rem;background-color:#fff;z-index:1000;--van-skeleton-paragraph-height: .8rem}._detail_vtlsh_12{width:100vw;height:100vh;overflow:hidden;overflow-y:auto;--header-height: 1.65333rem;background:var(--container-background)}._detail_vtlsh_12 ._container_vtlsh_20{margin:0 .26667rem;border-radius:.26667rem}._detail_vtlsh_12 #musicAndSelection{overflow:initial!important;height:initial!important;max-height:initial!important}\n",document.head.appendChild(c),{setters:[e=>{i=e.d,n=e.g,a=e.r,o=e.E,r=e.o,s=e.s,l=e.b,d=e.M}],execute:function(){const t="_detail_vtlsh_12",c="_container_vtlsh_20";e("default",i({name:"music-list",setup(){const e=n(),i=a({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:o.staff,base64:""},{state:!1,name:"首调",type:o.firstTone,base64:""},{state:!1,name:"固定调",type:o.fixedTone,base64:""}]});r((()=>{window.appName="colexiu",s.xmlUrl=e.xmlUrl,i.isLoading=!1}));const h=async()=>{console.log("渲染完成")};return()=>l("div",{class:t},[l("div",{id:"scrollContainer",class:[c,"hideCursor"]},[!i.isLoading&&l(d,{onRendered:h},null)])])}}))}}}));
+>>>>>>>> hotfix-11-11:dist/js/index-legacy-5816d614.js

File diff suppressed because it is too large
+ 1 - 0
dist/js/index-legacy-66491a36.js


+ 4 - 0
dist/js/index-legacy-7537d87e.js

@@ -1 +1,5 @@
+<<<<<<<< HEAD:dist/js/index-legacy-7537d87e.js
 System.register(["./instrument-legacy-52e6efc1.js"],(function(e,t){"use strict";var i,n,a,o,r,s,l,d,c=document.createElement("style");return c.textContent="._skeleton_vtlsh_1{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:.53333rem .8rem;background-color:#fff;z-index:1000;--van-skeleton-paragraph-height: .8rem}._detail_vtlsh_12{width:100vw;height:100vh;overflow:hidden;overflow-y:auto;--header-height: 1.65333rem;background:var(--container-background)}._detail_vtlsh_12 ._container_vtlsh_20{margin:0 .26667rem;border-radius:.26667rem}._detail_vtlsh_12 #musicAndSelection{overflow:initial!important;height:initial!important;max-height:initial!important}\n",document.head.appendChild(c),{setters:[e=>{i=e.d,n=e.g,a=e.r,o=e.E,r=e.o,s=e.s,l=e.b,d=e.M}],execute:function(){const t="_detail_vtlsh_12",c="_container_vtlsh_20";e("default",i({name:"music-list",setup(){const e=n(),i=a({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:o.staff,base64:""},{state:!1,name:"首调",type:o.firstTone,base64:""},{state:!1,name:"固定调",type:o.fixedTone,base64:""}]});r((()=>{window.appName="colexiu",s.xmlUrl=e.xmlUrl,i.isLoading=!1}));const h=async()=>{console.log("渲染完成")};return()=>l("div",{class:t},[l("div",{id:"scrollContainer",class:[c,"hideCursor"]},[!i.isLoading&&l(d,{onRendered:h},null)])])}}))}}}));
+========
+System.register(["./instrument-legacy-b493ffbb.js"],(function(e,t){"use strict";var i,n,a,o,r,s,l,d,c=document.createElement("style");return c.textContent="._skeleton_vtlsh_1{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:.53333rem .8rem;background-color:#fff;z-index:1000;--van-skeleton-paragraph-height: .8rem}._detail_vtlsh_12{width:100vw;height:100vh;overflow:hidden;overflow-y:auto;--header-height: 1.65333rem;background:var(--container-background)}._detail_vtlsh_12 ._container_vtlsh_20{margin:0 .26667rem;border-radius:.26667rem}._detail_vtlsh_12 #musicAndSelection{overflow:initial!important;height:initial!important;max-height:initial!important}\n",document.head.appendChild(c),{setters:[e=>{i=e.d,n=e.g,a=e.r,o=e.E,r=e.o,s=e.s,l=e.b,d=e.M}],execute:function(){const t="_detail_vtlsh_12",c="_container_vtlsh_20";e("default",i({name:"music-list",setup(){const e=n(),i=a({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:o.staff,base64:""},{state:!1,name:"首调",type:o.firstTone,base64:""},{state:!1,name:"固定调",type:o.fixedTone,base64:""}]});r((()=>{window.appName="colexiu",s.xmlUrl=e.xmlUrl,i.isLoading=!1}));const h=async()=>{console.log("渲染完成")};return()=>l("div",{class:t},[l("div",{id:"scrollContainer",class:[c,"hideCursor"]},[!i.isLoading&&l(d,{onRendered:h},null)])])}}))}}}));
+>>>>>>>> hotfix-11-11:dist/js/index-legacy-5816d614.js

File diff suppressed because it is too large
+ 1 - 0
dist/js/index-legacy-955740ec.js


File diff suppressed because it is too large
+ 1 - 0
dist/js/index-legacy-b75f894c.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/instrument-e10b8181.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/instrument-legacy-b493ffbb.js


+ 1 - 0
dist/js/modeView-31f847f2.js

@@ -0,0 +1 @@
+import{d as c,K as r,a1 as i,q as m,b as o,a2 as u,a3 as a,s as e,a4 as t,a5 as s,a6 as g,a7 as h,a8 as p}from"./instrument-e10b8181.js";const v=c({name:"modeView",setup(){var l;r(()=>i.socketErrorStatus,()=>{i.socketErrorStatus===2&&setTimeout(()=>{i.socketErrorPop=!1},1e3)});const n=m(),d=((l=navigator==null?void 0:navigator.userAgent)==null?void 0:l.includes("UAWEIVRD-W09"))||(n==null?void 0:n.iPad)||n.isTablet;return()=>o("div",{class:[a.modeView,d&&a.isiPad,s.modeType!=="init"&&a.hidden]},[o("img",{src:u,class:a.back,onClick:()=>{e.isSingleLine&&(t.isShow.value=e.melodyLine),s.oldModeType!=="practise"&&(i.needCheckErjiStatus=!1,s.handleChangeModeType(s.oldModeType)),s.modeType="show"}},null),o("div",{class:[a.modeBox,(!e.isPercussion&&!e.enableEvaluation||e.isPercussion&&e.enableEvaluation||e.isPercussion&&!e.enableEvaluation)&&a.twoModeBox]},[o("img",{class:a.modeImg,src:g,onClick:()=>{e.isSingleLine&&(t.isShow.value=e.melodyLine),s.handleChangeModeType("practise")}},null),!e.isPercussion&&o("img",{class:a.modeImg,src:h,onClick:()=>s.handleChangeModeType("follow")},null),e.enableEvaluation&&o("img",{class:a.modeImg,src:p,onClick:()=>{i.needCheckErjiStatus=!0,s.handleChangeModeType("evaluating")}},null)])])}});export{v as default};

+ 1 - 0
dist/js/modeView-legacy-129fa188.js

@@ -0,0 +1 @@
+System.register(["./instrument-legacy-b493ffbb.js"],(function(e,i){"use strict";var s,a,n,o,l,t,d,r,u,c,m,g,v;return{setters:[e=>{s=e.d,a=e.K,n=e.a1,o=e.q,l=e.b,t=e.a2,d=e.a3,r=e.s,u=e.a4,c=e.a5,m=e.a6,g=e.a7,v=e.a8}],execute:function(){e("default",s({name:"modeView",setup(){var e,i;a((()=>n.socketErrorStatus),(()=>{2===n.socketErrorStatus&&setTimeout((()=>{n.socketErrorPop=!1}),1e3)}));const s=o(),h=(null===(e=navigator)||void 0===e||null===(i=e.userAgent)||void 0===i?void 0:i.includes("UAWEIVRD-W09"))||(null==s?void 0:s.iPad)||s.isTablet;return()=>l("div",{class:[d.modeView,h&&d.isiPad,"init"!==c.modeType&&d.hidden]},[l("img",{src:t,class:d.back,onClick:()=>{r.isSingleLine&&(u.isShow.value=r.melodyLine),"practise"!==c.oldModeType&&(n.needCheckErjiStatus=!1,c.handleChangeModeType(c.oldModeType)),c.modeType="show"}},null),l("div",{class:[d.modeBox,(!r.isPercussion&&!r.enableEvaluation||r.isPercussion&&r.enableEvaluation||r.isPercussion&&!r.enableEvaluation)&&d.twoModeBox]},[l("img",{class:d.modeImg,src:m,onClick:()=>{r.isSingleLine&&(u.isShow.value=r.melodyLine),c.handleChangeModeType("practise")}},null),!r.isPercussion&&l("img",{class:d.modeImg,src:g,onClick:()=>c.handleChangeModeType("follow")},null),r.enableEvaluation&&l("img",{class:d.modeImg,src:v,onClick:()=>{n.needCheckErjiStatus=!0,c.handleChangeModeType("evaluating")}},null)])])}}))}}}));

File diff suppressed because it is too large
+ 0 - 0
dist/js/polyfills-legacy-b653339e.js


+ 27 - 0
src/helpers/svgToPng.ts

@@ -0,0 +1,27 @@
+// 将svg转成png
+export const getSvgPngToSize = (osmd: any) => {
+    if (osmd) {
+      if (osmd.Drawer.Backends.length > 0) {
+        var imgList = []
+
+        for (var idx = 0, len = osmd.Drawer.Backends.length; idx < len; idx++) {
+          var backend = osmd.Drawer.Backends[idx]
+          var state = backend.ctx.state;
+          var width = backend.ctx.width / state.scale.x;
+          var height = backend.ctx.height / state.scale.y;
+          var cont = new XMLSerializer().serializeToString(
+            backend.ctx.svg
+          )
+
+          imgList.push({
+            img: cont,
+            width: width,
+            height: height,
+          })
+        }
+        return imgList
+      }
+    } else {
+      console.log('没有OSMD')
+    }
+}

+ 13 - 0
src/page-instrument/view-detail/index.tsx

@@ -40,6 +40,7 @@ import Loading from "./loading"
 import ExerciseStatistics from "../custom-plugins/ExerciseStatistics"
 import { musicData } from "/src/view/music-score"
 import Vip from "/src/page-instrument/component/vip"
+import { getSvgPngToSize } from "/src/helpers/svgToPng"
 // import bgJson from "./images/index.json";
 
 // const DelayCheck = defineAsyncComponent(() =>
@@ -312,6 +313,18 @@ export default defineComponent({
       // } else {
       //   state.musicScoreBtnDirection = state.playBtnDirection;
       // }
+
+      // 管乐迷曲谱详情页,需要下载A4尺寸的图片
+      if (query.downPng === 'A4') {
+        const imgList = getSvgPngToSize(state.osmd)
+        console.log('A4', imgList)
+        window.parent.postMessage({
+          api: 'musicStaffRender',
+          loading: false,
+          osmdImg: imgList
+        }, '*');
+      }
+
       state.musicScoreBtnDirection = state.playBtnDirection;
       state.musicRendered = true;
 

+ 6 - 1
src/view/music-score/index.tsx

@@ -172,7 +172,12 @@ export default defineComponent({
 					osmd.Sheet.Instruments[i].Visible = canSelectTracks.includes(trackName)
 				}
 			}
-			osmd.zoom = state.zoom;
+			if (query.downPng === 'A4') {
+				osmd.setPageFormat('794x1070')
+				osmd.zoom = 0.3;
+			} else {
+				osmd.zoom = state.zoom;
+			}
 			osmd.render();
 			console.log("🚀 ~ osmd:", osmd)
 			emit("rendered", osmd);

File diff suppressed because it is too large
+ 1 - 0
stats.html


Some files were not shown because too many files changed in this diff