|
@@ -3,7 +3,7 @@ import { connectWebsocket, evaluatingData, handleEndBegin, handleStartBegin, han
|
|
|
import Earphone from "./earphone";
|
|
|
import styles from "./index.module.less";
|
|
|
import SoundEffect from "./sound-effect";
|
|
|
-import state, { handleRessetState, resetPlaybackToStart, musicalInstrumentCodeInfo, clearSelection, initSetPlayRate } from "/src/state";
|
|
|
+import state, { handleRessetState, resetPlaybackToStart, musicalInstrumentCodeInfo, clearSelection, initSetPlayRate, resetBaseRate } from "/src/state";
|
|
|
import { storeData } from "/src/store";
|
|
|
import { browser } from "/src/utils";
|
|
|
import { getNoteByMeasuresSlursStart } from "/src/helpers/formateMusic";
|
|
@@ -23,6 +23,8 @@ import { headTopData } from "../header-top/index";
|
|
|
import { getQuery } from "/src/utils/queryString";
|
|
|
import Countdown from "./countdown";
|
|
|
import { IPostMessage } from "/src/utils/native-message";
|
|
|
+import tipErjiBg from "./icons/tip_erji.png"
|
|
|
+import tipErjiBtn from "./icons/tip_btn.png"
|
|
|
|
|
|
// const DelayCheck = defineAsyncComponent(() =>
|
|
|
// import('./delay-check')
|
|
@@ -346,7 +348,8 @@ export default defineComponent({
|
|
|
evaluatingData.oneselfCancleEvaluating = true;
|
|
|
// handleCancelEvaluat();
|
|
|
handleEndEvaluat(true, 'selfCancel');
|
|
|
- evaluatingData.isBeginMask = true;
|
|
|
+ // evaluatingData.isBeginMask = true;
|
|
|
+ evaluatingData.evaluatings = {};
|
|
|
state.playState = "paused";
|
|
|
}
|
|
|
resetPlaybackToStart();
|
|
@@ -417,6 +420,11 @@ export default defineComponent({
|
|
|
});
|
|
|
}
|
|
|
// console.log('异常流程3')
|
|
|
+ // 非选段状态,从头开始评测,重置速度
|
|
|
+ if (!state.sectionStatus && state.section.length === 0) {
|
|
|
+ state.activeNoteIndex = 0;
|
|
|
+ state.speed = state.times[0].measureSpeed * state.basePlayRate
|
|
|
+ }
|
|
|
initSetPlayRate();
|
|
|
// 检测APP端socket状态
|
|
|
const res: any = await startCheckDelay();
|
|
@@ -447,7 +455,7 @@ export default defineComponent({
|
|
|
if (res?.content) {
|
|
|
evaluatingData.checkEnd = true;
|
|
|
state.setting.soundEffect = false;
|
|
|
- checkEarphoneStatus();
|
|
|
+ evaluatingData.tipErjiShow = true;
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -460,6 +468,10 @@ export default defineComponent({
|
|
|
return evaluatingData.earphoneMode && !state.isLoading && !state.hasDriverPop;
|
|
|
});
|
|
|
|
|
|
+ const tipErjiPopShow = computed(() => {
|
|
|
+ return evaluatingData.tipErjiShow && !state.isLoading && !state.hasDriverPop;
|
|
|
+ });
|
|
|
+
|
|
|
// watch(
|
|
|
// () => state.setting.soundEffect,
|
|
|
// (val) => {
|
|
@@ -472,16 +484,16 @@ export default defineComponent({
|
|
|
// );
|
|
|
|
|
|
// 手动取消评测,需要自动再次评测
|
|
|
- watch(
|
|
|
- () => evaluatingData.needReplayEvaluat,
|
|
|
- (val) => {
|
|
|
- if (val && evaluatingData.oneselfCancleEvaluating) {
|
|
|
- setTimeout(() => {
|
|
|
- startBtnHandle();
|
|
|
- }, 500);
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
+ // watch(
|
|
|
+ // () => evaluatingData.needReplayEvaluat,
|
|
|
+ // (val) => {
|
|
|
+ // if (val && evaluatingData.oneselfCancleEvaluating) {
|
|
|
+ // setTimeout(() => {
|
|
|
+ // startBtnHandle();
|
|
|
+ // }, 500);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // );
|
|
|
|
|
|
onMounted(async () => {
|
|
|
// 如果打开了延迟检测开关,需要先发送开始检测的消息
|
|
@@ -559,6 +571,15 @@ export default defineComponent({
|
|
|
{
|
|
|
evaluatingData.isBeginMask && <div class={styles.beginMask}></div>
|
|
|
}
|
|
|
+ <Popup teleport="body" closeOnClickOverlay={false} class={["popup-custom", "van-scale"]} transition="van-scale" v-model:show={tipErjiPopShow.value}>
|
|
|
+ <div class={styles.earphoneBox}>
|
|
|
+ <img class={styles.earphoneBg} src={tipErjiBg} />
|
|
|
+ <img class={styles.earphoneBtn} src={tipErjiBtn} onClick={() => {
|
|
|
+ evaluatingData.tipErjiShow = false;
|
|
|
+ checkEarphoneStatus();
|
|
|
+ }} />
|
|
|
+ </div>
|
|
|
+ </Popup>
|
|
|
<Popup teleport="body" closeOnClickOverlay={false} class={["popup-custom", "van-scale"]} transition="van-scale" v-model:show={earPhonePopShow.value}>
|
|
|
<Earphone
|
|
|
earphoneType={evaluatingData.earPhoneType}
|
|
@@ -568,7 +589,7 @@ export default defineComponent({
|
|
|
// #11035,可能刚好关闭耳机弹窗的时候,第二次又出现了弹窗
|
|
|
setTimeout(() => {
|
|
|
evaluatingData.earphoneMode = false;
|
|
|
- }, 0);
|
|
|
+ }, 300);
|
|
|
// handlePerformDetection();
|
|
|
checkEarphoneStatus("start");
|
|
|
}}
|