|
@@ -165,7 +165,7 @@ export default defineComponent({
|
|
|
};
|
|
|
const getFingeringData = async () => {
|
|
|
const subject: any = data.subject + (data.viewIndex === 0 ? "" : data.viewIndex);
|
|
|
- console.log("🚀 ~ subject:", subject);
|
|
|
+ console.log("🚀 ~ subject:模式", subject, data.viewIndex, data.fingeringMode);
|
|
|
fingerData.subject = await getFingeringConfig(subject);
|
|
|
};
|
|
|
const createAudio = (url: string) => {
|
|
@@ -223,7 +223,7 @@ export default defineComponent({
|
|
|
if (playAction.showAnswerLoading) return;
|
|
|
data.loadingImg = true;
|
|
|
if (data.fingeringMode === "scaleMode") {
|
|
|
- if (["pan-flute", "ocarina"].includes(data.subject)) {
|
|
|
+ if (["pan-flute", "ocarina", "whistling"].includes(data.subject)) {
|
|
|
data.viewIndex = 1;
|
|
|
} else {
|
|
|
data.viewIndex = 0;
|
|
@@ -231,6 +231,7 @@ export default defineComponent({
|
|
|
const o: any = {
|
|
|
"pan-flute": 2,
|
|
|
ocarina: 2,
|
|
|
+ whistling: 2,
|
|
|
piccolo: 2,
|
|
|
"hulusi-flute": 2,
|
|
|
"baroque-recorder": 2,
|
|
@@ -259,11 +260,11 @@ export default defineComponent({
|
|
|
if (data.fingeringMode === "fingeringMode") {
|
|
|
if (data.subject === "pan-flute") {
|
|
|
data.viewIndex = 3;
|
|
|
- } else if (["pan-flute", "ocarina", "melodica"].includes(data.subject)) {
|
|
|
+ } else if (["pan-flute", "ocarina", "melodica", "whistling"].includes(data.subject)) {
|
|
|
data.viewIndex = 1;
|
|
|
}
|
|
|
} else {
|
|
|
- if (["pan-flute", "ocarina"].includes(data.subject)) {
|
|
|
+ if (["pan-flute", "ocarina", "whistling"].includes(data.subject)) {
|
|
|
data.viewIndex = 1;
|
|
|
}
|
|
|
}
|
|
@@ -348,6 +349,7 @@ export default defineComponent({
|
|
|
if (showNote) {
|
|
|
data.realKey = item.realKey;
|
|
|
}
|
|
|
+ console.log('key:', item.realKey, data.soundFonts)
|
|
|
data.noteAudio = data.soundFonts[item.realKey];
|
|
|
if (data.noteAudio) {
|
|
|
data.noteAudio.play();
|
|
@@ -797,7 +799,7 @@ export default defineComponent({
|
|
|
paddingTop: "1.3rem",
|
|
|
paddingBottom: "0",
|
|
|
};
|
|
|
- } else if (data.subject === "ocarina") {
|
|
|
+ } else if (data.subject === "ocarina" || data.subject === "whistling") {
|
|
|
return {
|
|
|
paddingTop: "1.3rem",
|
|
|
paddingBottom: "0",
|
|
@@ -829,7 +831,7 @@ export default defineComponent({
|
|
|
paddingTop: "1.3rem",
|
|
|
paddingBottom: "0",
|
|
|
};
|
|
|
- } else if (data.subject === "ocarina") {
|
|
|
+ } else if (data.subject === "ocarina" || data.subject === "whistling") {
|
|
|
return {
|
|
|
paddingTop: "1.3rem",
|
|
|
paddingBottom: "0",
|
|
@@ -1217,7 +1219,7 @@ export default defineComponent({
|
|
|
onClick={() => {
|
|
|
data.viewIndex++;
|
|
|
if (data.viewIndex > data.viewTotal) {
|
|
|
- if (["pan-flute", "ocarina"].includes(data.subject)) {
|
|
|
+ if (["pan-flute", "ocarina", "whistling"].includes(data.subject)) {
|
|
|
data.viewIndex = 1;
|
|
|
} else {
|
|
|
data.viewIndex = 0;
|