|
@@ -6,13 +6,13 @@ import icons from "./image/headerTop.json";
|
|
|
import { Badge, Circle, Popover, Popup } from "vant";
|
|
|
import { metronomeData } from "../../helpers/metronome";
|
|
|
import Speed from "./speed";
|
|
|
-import { handleStartEvaluat } from "/src/view/evaluating";
|
|
|
+import { handleEndBegin, handleStartEvaluat } from "/src/view/evaluating";
|
|
|
import Settting from "./settting";
|
|
|
import ModeTypeMode from "./mode-type-mode";
|
|
|
import state, { handleChangeSection, handleResetPlay, handleRessetState, togglePlay } from "/src/state";
|
|
|
import { getAudioCurrentTime } from "/src/view/audio-list";
|
|
|
import { toggleFollow } from "/src/view/follow-practice";
|
|
|
-import { api_back } from "/src/helpers/communication";
|
|
|
+import { api_back, api_suspendPlay } from "/src/helpers/communication";
|
|
|
import MusicType from "./music-type";
|
|
|
import { handleNoEndExit } from "../custom-plugins/recording-time";
|
|
|
|
|
@@ -75,6 +75,16 @@ export default defineComponent({
|
|
|
api_back();
|
|
|
};
|
|
|
|
|
|
+ onMounted(() => {
|
|
|
+ api_suspendPlay(() => {
|
|
|
+ if (state.modeType === 'practise') {
|
|
|
+ togglePlay('paused')
|
|
|
+ } else if (state.modeType === 'evaluating'){
|
|
|
+ handleEndBegin()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
return () => (
|
|
|
<div ref={headRef} class={styles.headerTop}>
|
|
|
<div class={styles.back} onClick={handleBack}>
|