|
@@ -140,8 +140,14 @@ export default defineComponent({
|
|
|
// const erji = await checkUseEarphone();
|
|
|
const res = await getEarphone();
|
|
|
const erji = res?.content?.checkIsWired || false;
|
|
|
- console.log("耳机状态111", res);
|
|
|
- evaluatingData.earphoneMode = true;
|
|
|
+ // 是否已经提示过耳机弹窗,重新进入评测页面,重置该状态为false,手动关掉耳机弹窗,改变该状态为true,本次评测都不在提示耳机状态弹窗
|
|
|
+ if (!evaluatingData.onceErjiPopShow) {
|
|
|
+ evaluatingData.earphoneMode = true;
|
|
|
+ } else {
|
|
|
+ clearTimeout(checkErjiTimer);
|
|
|
+ checkErjiTimer = null;
|
|
|
+ return;
|
|
|
+ }
|
|
|
evaluatingData.earPhoneType = res?.content?.type || "";
|
|
|
if (evaluatingData.earPhoneType === "有线耳机") {
|
|
|
clearTimeout(checkErjiTimer);
|
|
@@ -303,7 +309,7 @@ export default defineComponent({
|
|
|
speed: evaluatSpeed,
|
|
|
heardLevel: state.setting.evaluationDifficulty,
|
|
|
// beatLength: Math.round((state.fixtime * 1000) / rate),
|
|
|
- beatLength: actualBeatLength,
|
|
|
+ beatLength: actualBeatLength / rate,
|
|
|
evaluationCriteria: state.evaluationStandard,
|
|
|
speedRate: parseFloat(rate.toFixed(2)), // 播放倍率
|
|
|
};
|
|
@@ -506,7 +512,10 @@ export default defineComponent({
|
|
|
await api_startDelayCheck({});
|
|
|
} else {
|
|
|
evaluatingData.checkEnd = true;
|
|
|
- checkEarphoneStatus();
|
|
|
+ // 点击评测模式进入评测模块的需要检测耳机状态,通过返回按钮进入评测模块的,不检测耳机状态
|
|
|
+ if (evaluatingData.needCheckErjiStatus) {
|
|
|
+ checkEarphoneStatus();
|
|
|
+ }
|
|
|
}
|
|
|
evaluatingData.isDisabledPlayMusic = true;
|
|
|
// handlePerformDetection();
|
|
@@ -587,6 +596,7 @@ export default defineComponent({
|
|
|
<Earphone
|
|
|
earphoneType={evaluatingData.earPhoneType}
|
|
|
onClose={() => {
|
|
|
+ evaluatingData.onceErjiPopShow = true;
|
|
|
clearTimeout(checkErjiTimer);
|
|
|
checkErjiTimer = null;
|
|
|
// #11035,可能刚好关闭耳机弹窗的时候,第二次又出现了弹窗
|