|
@@ -23,7 +23,7 @@ import { Howl } from "howler";
|
|
import { storeData } from "/src/store";
|
|
import { storeData } from "/src/store";
|
|
import { api_back, api_setRequestedOrientation } from "/src/helpers/communication";
|
|
import { api_back, api_setRequestedOrientation } from "/src/helpers/communication";
|
|
import Hammer from "hammerjs";
|
|
import Hammer from "hammerjs";
|
|
-import { Button, Icon, Loading, Popup, Space } from "vant";
|
|
|
|
|
|
+import { Button, Icon, Loading, Popup, Progress, Space } from "vant";
|
|
import GuideIndex from "./guide/guide-index";
|
|
import GuideIndex from "./guide/guide-index";
|
|
import { getQuery } from "/src/utils/queryString";
|
|
import { getQuery } from "/src/utils/queryString";
|
|
import { browser } from "/src/utils";
|
|
import { browser } from "/src/utils";
|
|
@@ -31,6 +31,7 @@ import { usePageVisibility } from "@vant/use";
|
|
import { watch } from "vue";
|
|
import { watch } from "vue";
|
|
import { Vue3Lottie } from "vue3-lottie";
|
|
import { Vue3Lottie } from "vue3-lottie";
|
|
import refesh_anim from "./refresh_anim.json";
|
|
import refesh_anim from "./refresh_anim.json";
|
|
|
|
+import icon_loading_img from './image/icon_loading_img.png'
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: "viewFigner",
|
|
name: "viewFigner",
|
|
@@ -84,13 +85,7 @@ export default defineComponent({
|
|
subject: null as unknown as ITypeFingering,
|
|
subject: null as unknown as ITypeFingering,
|
|
fingeringInfo: subjectFingering(data.subject),
|
|
fingeringInfo: subjectFingering(data.subject),
|
|
});
|
|
});
|
|
- if (!props.isComponent){
|
|
|
|
- console.log(fingerData.fingeringInfo.orientation)
|
|
|
|
- if (fingerData.fingeringInfo.orientation === 0){
|
|
|
|
- // api_setRequestedOrientation(fingerData.fingeringInfo.orientation);
|
|
|
|
- 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) {
|
|
@@ -116,6 +111,16 @@ export default defineComponent({
|
|
const subject: any = data.subject + (data.viewIndex === 0 ? "" : data.viewIndex);
|
|
const subject: any = data.subject + (data.viewIndex === 0 ? "" : data.viewIndex);
|
|
console.log("🚀 ~ subject:", subject);
|
|
console.log("🚀 ~ subject:", subject);
|
|
fingerData.subject = await getFingeringConfig(subject);
|
|
fingerData.subject = await getFingeringConfig(subject);
|
|
|
|
+
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ if (!props.isComponent){
|
|
|
|
+ console.log(fingerData.fingeringInfo.orientation)
|
|
|
|
+ if (fingerData.fingeringInfo.orientation === 1){
|
|
|
|
+ api_setRequestedOrientation(fingerData.fingeringInfo.orientation);
|
|
|
|
+ // fingerData.fingeringInfo.orientation = 1
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }, 2000)
|
|
};
|
|
};
|
|
const createAudio = (url: string) => {
|
|
const createAudio = (url: string) => {
|
|
return new Promise((resolve) => {
|
|
return new Promise((resolve) => {
|
|
@@ -179,9 +184,9 @@ export default defineComponent({
|
|
emit("close");
|
|
emit("close");
|
|
return;
|
|
return;
|
|
} else {
|
|
} else {
|
|
- // if (fingerData.fingeringInfo.orientation === 0){
|
|
|
|
- // api_setRequestedOrientation(1);
|
|
|
|
- // }
|
|
|
|
|
|
+ if (fingerData.fingeringInfo.orientation === 1){
|
|
|
|
+ api_setRequestedOrientation(0);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// 不在APP中,
|
|
// 不在APP中,
|
|
if (!storeData.isApp) {
|
|
if (!storeData.isApp) {
|
|
@@ -439,14 +444,18 @@ export default defineComponent({
|
|
))}
|
|
))}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- {/* {data.loadingSoundFonts && (
|
|
|
|
|
|
+ {data.loadingSoundFonts && (
|
|
<div class={styles.loading}>
|
|
<div class={styles.loading}>
|
|
|
|
+ <div class={styles.loadingWrap}>
|
|
|
|
+ <img class={styles.loadingIcon} src={icon_loading_img} />
|
|
|
|
+ <Progress percentage={20} />
|
|
|
|
+ </div>
|
|
<Vue3Lottie
|
|
<Vue3Lottie
|
|
style={{ width: "100px", height: "100px" }}
|
|
style={{ width: "100px", height: "100px" }}
|
|
animationData={refesh_anim}
|
|
animationData={refesh_anim}
|
|
></Vue3Lottie>
|
|
></Vue3Lottie>
|
|
</div>
|
|
</div>
|
|
- )} */}
|
|
|
|
|
|
+ )}
|
|
</div>
|
|
</div>
|
|
{!!data.tones.length && (
|
|
{!!data.tones.length && (
|
|
<>
|
|
<>
|