|
@@ -1,5 +1,5 @@
|
|
|
import { Transition, defineComponent, onMounted, reactive, watch } from "vue";
|
|
|
-import { connectWebsocket, evaluatingData, handleEndBegin, handleStartBegin, handleStartEvaluat, handleViewReport, startCheckDelay } from "/src/view/evaluating";
|
|
|
+import { connectWebsocket, evaluatingData, handleEndBegin, handleStartBegin, handleStartEvaluat, handleViewReport, startCheckDelay, checkUseEarphone } from "/src/view/evaluating";
|
|
|
import Earphone from "./earphone";
|
|
|
import styles from "./index.module.less";
|
|
|
import SoundEffect from "./sound-effect";
|
|
@@ -60,7 +60,7 @@ export default defineComponent({
|
|
|
* 执行检测
|
|
|
*/
|
|
|
const handlePerformDetection = async () => {
|
|
|
- console.log(evaluatingData.checkStep, evaluatingData, "检测");
|
|
|
+ console.log(evaluatingData.checkStep, evaluatingData, "检测123");
|
|
|
// 检测完成不检测了
|
|
|
if (evaluatingData.checkEnd) return;
|
|
|
// 延迟检测
|
|
@@ -88,6 +88,10 @@ export default defineComponent({
|
|
|
}
|
|
|
// 效验完成
|
|
|
if (evaluatingData.checkStep === 10) {
|
|
|
+ const erji = await checkUseEarphone();
|
|
|
+ if (!erji) {
|
|
|
+ evaluatingData.earphoneMode = true;
|
|
|
+ }
|
|
|
evaluatingData.checkEnd = true;
|
|
|
console.log("检测结束,生成数据");
|
|
|
handleConnect();
|