|
@@ -30,6 +30,7 @@ import HeaderTop from "../header-top";
|
|
|
import styles from "./index.module.less";
|
|
|
import {
|
|
|
api_cloudLoading,
|
|
|
+ api_keepScreenLongLight,
|
|
|
api_openCamera,
|
|
|
api_setEventTracking,
|
|
|
api_setStatusBarVisibility,
|
|
@@ -51,16 +52,16 @@ import TheMusicList from "../component/the-music-list";
|
|
|
/** 需要处理频率的乐器
|
|
|
* 120: 竖笛
|
|
|
*/
|
|
|
-const instrumentSubject = [120]
|
|
|
-const resetFrequency =(list: any[]) => {
|
|
|
- if (!instrumentSubject.includes(state.subjectId)) return list
|
|
|
- for(let i = 0; i < list.length; i++){
|
|
|
- if (list[i].prevFrequency) list[i].prevFrequency = list[i].prevFrequency * 2
|
|
|
- if (list[i].frequency) list[i].frequency = list[i].frequency * 2
|
|
|
- if (list[i].nextFrequency) list[i].nextFrequency = list[i].nextFrequency * 2
|
|
|
+const instrumentSubject = [120];
|
|
|
+const resetFrequency = (list: any[]) => {
|
|
|
+ if (!instrumentSubject.includes(state.subjectId)) return list;
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
+ if (list[i].prevFrequency) list[i].prevFrequency = list[i].prevFrequency * 2;
|
|
|
+ if (list[i].frequency) list[i].frequency = list[i].frequency * 2;
|
|
|
+ if (list[i].nextFrequency) list[i].nextFrequency = list[i].nextFrequency * 2;
|
|
|
}
|
|
|
- return list
|
|
|
-}
|
|
|
+ return list;
|
|
|
+};
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: "music-list",
|
|
@@ -84,6 +85,7 @@ export default defineComponent({
|
|
|
}
|
|
|
};
|
|
|
onBeforeMount(() => {
|
|
|
+ api_keepScreenLongLight();
|
|
|
getAPPData();
|
|
|
api_setStatusBarVisibility();
|
|
|
const settting = store.get("musicscoresetting");
|
|
@@ -206,7 +208,7 @@ export default defineComponent({
|
|
|
handleSetSpeed(saveSpeed);
|
|
|
}
|
|
|
state.times = formateTimes(osmd);
|
|
|
- state.times = resetFrequency(state.times)
|
|
|
+ state.times = resetFrequency(state.times);
|
|
|
console.log("🚀 ~ state.times:", state.times, state.subjectId);
|
|
|
try {
|
|
|
metronomeData.metro = new Metronome();
|