|
@@ -29,7 +29,7 @@ import { getQuery } from "/src/utils/queryString";
|
|
import { browser } from "/src/utils";
|
|
import { browser } from "/src/utils";
|
|
import { usePageVisibility } from "@vant/use";
|
|
import { usePageVisibility } from "@vant/use";
|
|
import { watch } from "vue";
|
|
import { watch } from "vue";
|
|
-import icon_loading_img from './image/icon_loading_img.png'
|
|
|
|
|
|
+import icon_loading_img from "./image/icon_loading_img.png";
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: "viewFigner",
|
|
name: "viewFigner",
|
|
@@ -47,7 +47,7 @@ export default defineComponent({
|
|
setup(props, { emit }) {
|
|
setup(props, { emit }) {
|
|
const query = getQuery();
|
|
const query = getQuery();
|
|
const browsInfo = browser();
|
|
const browsInfo = browser();
|
|
- const code = mappingVoicePart(query.code, "INSTRUMENT")
|
|
|
|
|
|
+ const code = mappingVoicePart(query.code, "INSTRUMENT");
|
|
const subject = props.isComponent ? props.subject || "pan-flute" : code || "pan-flute";
|
|
const subject = props.isComponent ? props.subject || "pan-flute" : code || "pan-flute";
|
|
const data = reactive({
|
|
const data = reactive({
|
|
loading: true,
|
|
loading: true,
|
|
@@ -77,7 +77,7 @@ export default defineComponent({
|
|
loadingSoundFonts: true,
|
|
loadingSoundFonts: true,
|
|
loadingSoundProgress: 0,
|
|
loadingSoundProgress: 0,
|
|
|
|
|
|
- huaweiPad: navigator?.userAgent?.includes('UAWEIVRD-W09') ? true : false
|
|
|
|
|
|
+ huaweiPad: navigator?.userAgent?.includes("UAWEIVRD-W09") ? true : false,
|
|
});
|
|
});
|
|
const fingerData = reactive({
|
|
const fingerData = reactive({
|
|
relationshipIndex: 0,
|
|
relationshipIndex: 0,
|
|
@@ -85,12 +85,12 @@ export default defineComponent({
|
|
fingeringInfo: subjectFingering(data.subject),
|
|
fingeringInfo: subjectFingering(data.subject),
|
|
});
|
|
});
|
|
|
|
|
|
- if (!props.isComponent){
|
|
|
|
- if (fingerData.fingeringInfo.orientation === 0){
|
|
|
|
- fingerData.fingeringInfo.orientation = 1
|
|
|
|
|
|
+ if (!props.isComponent) {
|
|
|
|
+ if (fingerData.fingeringInfo.orientation === 0) {
|
|
|
|
+ fingerData.fingeringInfo.orientation = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
const getNotes = () => {
|
|
const getNotes = () => {
|
|
const fignerData = FIGNER_INSTRUMENT_DATA[data.subject as keyof typeof FIGNER_INSTRUMENT_DATA];
|
|
const fignerData = FIGNER_INSTRUMENT_DATA[data.subject as keyof typeof FIGNER_INSTRUMENT_DATA];
|
|
if (fignerData) {
|
|
if (fignerData) {
|
|
@@ -118,12 +118,12 @@ export default defineComponent({
|
|
fingerData.subject = await getFingeringConfig(subject);
|
|
fingerData.subject = await getFingeringConfig(subject);
|
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- if (!props.isComponent){
|
|
|
|
- if (fingerData.fingeringInfo.orientation === 1){
|
|
|
|
|
|
+ if (!props.isComponent) {
|
|
|
|
+ if (fingerData.fingeringInfo.orientation === 1) {
|
|
api_setRequestedOrientation(fingerData.fingeringInfo.orientation);
|
|
api_setRequestedOrientation(fingerData.fingeringInfo.orientation);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }, 2000)
|
|
|
|
|
|
+ }, 2000);
|
|
};
|
|
};
|
|
const createAudio = (url: string) => {
|
|
const createAudio = (url: string) => {
|
|
return new Promise((resolve) => {
|
|
return new Promise((resolve) => {
|
|
@@ -190,7 +190,7 @@ export default defineComponent({
|
|
emit("close");
|
|
emit("close");
|
|
return;
|
|
return;
|
|
} else {
|
|
} else {
|
|
- if (fingerData.fingeringInfo.orientation === 1){
|
|
|
|
|
|
+ if (fingerData.fingeringInfo.orientation === 1) {
|
|
api_setRequestedOrientation(0);
|
|
api_setRequestedOrientation(0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -319,14 +319,11 @@ export default defineComponent({
|
|
: styles.fingerRight,
|
|
: styles.fingerRight,
|
|
]}
|
|
]}
|
|
>
|
|
>
|
|
|
|
+ <button class={[styles.backBtn]} onClick={() => handleBack()}>
|
|
|
|
+ <img src={icons.icon_back} />
|
|
|
|
+ </button>
|
|
<div class={styles.head}>
|
|
<div class={styles.head}>
|
|
<div class={styles.left}>
|
|
<div class={styles.left}>
|
|
- <button
|
|
|
|
- class={[styles.backBtn]}
|
|
|
|
- onClick={() => handleBack()}
|
|
|
|
- >
|
|
|
|
- <img src={icons.icon_back} />
|
|
|
|
- </button>
|
|
|
|
{data.subject === "pan-flute" && (
|
|
{data.subject === "pan-flute" && (
|
|
<div
|
|
<div
|
|
class={styles.baseBtn}
|
|
class={styles.baseBtn}
|
|
@@ -392,7 +389,13 @@ export default defineComponent({
|
|
<Button class={styles.noteBtn} onClick={() => scrollNoteBox("left")}>
|
|
<Button class={styles.noteBtn} onClick={() => scrollNoteBox("left")}>
|
|
<Icon name="arrow-left" />
|
|
<Icon name="arrow-left" />
|
|
</Button>
|
|
</Button>
|
|
- <div class={[styles.noteContent, browsInfo.ios ? "" : styles.noteContentWrap, data.huaweiPad && styles.huaweiPad]}>
|
|
|
|
|
|
+ <div
|
|
|
|
+ class={[
|
|
|
|
+ styles.noteContent,
|
|
|
|
+ browsInfo.ios ? "" : styles.noteContentWrap,
|
|
|
|
+ data.huaweiPad && styles.huaweiPad,
|
|
|
|
+ ]}
|
|
|
|
+ >
|
|
<div ref={noteBoxRef} class={styles.noteBox}>
|
|
<div ref={noteBoxRef} class={styles.noteBox}>
|
|
{data.notes.map((note: IFIGNER_INSTRUMENT_Note, index: number) => {
|
|
{data.notes.map((note: IFIGNER_INSTRUMENT_Note, index: number) => {
|
|
const steps = new Array(Math.abs(note.step)).fill(1);
|
|
const steps = new Array(Math.abs(note.step)).fill(1);
|