|
@@ -5,6 +5,7 @@ import styles from "./index.module.less";
|
|
|
import { getQuery } from "/src/utils/queryString";
|
|
|
import { closeToast, showLoadingToast } from "vant";
|
|
|
import { svg2canvas } from "/src/utils/svg2canvas";
|
|
|
+import { moveGracePosition } from "/src/helpers/customMusicScore"
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: "transfer-to-img",
|
|
@@ -35,11 +36,16 @@ export default defineComponent({
|
|
|
base64: "" as any,
|
|
|
},
|
|
|
],
|
|
|
+ isSpecialXml: false, // TODO:是否是摇篮曲(节奏练习)的曲子
|
|
|
});
|
|
|
|
|
|
onMounted(() => {
|
|
|
(window as any).appName = "colexiu";
|
|
|
state.xmlUrl = decodeURIComponent(query.xmlUrl);
|
|
|
+ const specialXmls = ['https://oss.dayaedu.com/MECMP/1715332965751.xml','https://oss.dayaedu.com/MECMP/1715326622946.xml'];
|
|
|
+ if (specialXmls.includes(state.xmlUrl)) {
|
|
|
+ detailData.isSpecialXml = true;
|
|
|
+ }
|
|
|
//课堂乐器,默认简谱
|
|
|
sessionStorage.setItem(productRenderType, detailData.product[detailData.step].type);
|
|
|
|
|
@@ -51,7 +57,9 @@ export default defineComponent({
|
|
|
|
|
|
/** 渲染完成 */
|
|
|
const handleRendered = async () => {
|
|
|
-
|
|
|
+ if (document.getElementById('scrollContainer')) {
|
|
|
+ moveGracePosition(detailData.isSpecialXml);
|
|
|
+ }
|
|
|
detailData.product[detailData.step].state = true;
|
|
|
detailData.product[detailData.step].base64 = await downPng();
|
|
|
|