|
@@ -394,7 +394,7 @@ const connect = async () => {
|
|
|
clientId: 'STUDENT',
|
|
|
hertz: SettingState.sett.hertz,
|
|
|
feature: 'EVALUATION',
|
|
|
- practiceSource: search.unitId ? 'UNIT_TEST' : 'PRACTICE',
|
|
|
+ practiceSource: (search.resourceType && search.resourceType === 'practice') ? 'UNIT_TEST_PRACTICE' : search.unitId ? 'UNIT_TEST' : 'PRACTICE',
|
|
|
// 这里定义的是数字但是因为是通过input输入所以强制转化一次
|
|
|
reactionTimeMs: parseFloat('' + SettingState.eva.reactionTimeMs) || 0,
|
|
|
speed: runtime.speed,
|
|
@@ -454,13 +454,15 @@ const sendOffsetTime = (offsetTime: number) => {
|
|
|
|
|
|
const cancelTheEvaluation = () => {
|
|
|
const search = useOriginSearch()
|
|
|
- postMessage({ api: 'endEvaluating', content: { musicScoreId: search.id } })
|
|
|
- playStatus.value = 'stop'
|
|
|
- RuntimeUtils.pause()
|
|
|
- RuntimeUtils.resetPlayStatus()
|
|
|
- RuntimeUtils.clearIntervalTimeline()
|
|
|
- RuntimeUtils.setCurrentTime(0)
|
|
|
- Toast.clear()
|
|
|
+ setTimeout(() => {
|
|
|
+ postMessage({ api: 'endEvaluating', content: { musicScoreId: search.id } })
|
|
|
+ playStatus.value = 'stop'
|
|
|
+ RuntimeUtils.pause()
|
|
|
+ RuntimeUtils.resetPlayStatus()
|
|
|
+ RuntimeUtils.clearIntervalTimeline()
|
|
|
+ RuntimeUtils.setCurrentTime(0)
|
|
|
+ Toast.clear()
|
|
|
+ }, 500);
|
|
|
}
|
|
|
|
|
|
const stopPlay = () => {
|
|
@@ -571,21 +573,23 @@ const playerStop = () => {
|
|
|
message: '评分中...',
|
|
|
type: 'loading',
|
|
|
})
|
|
|
- postMessage(
|
|
|
- {
|
|
|
- api: 'endEvaluating',
|
|
|
- content: {
|
|
|
- musicScoreId: useOriginSearch().id,
|
|
|
+ setTimeout(() => {
|
|
|
+ postMessage(
|
|
|
+ {
|
|
|
+ api: 'endEvaluating',
|
|
|
+ content: {
|
|
|
+ musicScoreId: useOriginSearch().id,
|
|
|
+ },
|
|
|
},
|
|
|
- },
|
|
|
- (evt) => {
|
|
|
- console.log('调用endEvaluating结束', evt)
|
|
|
- endloading.value = false
|
|
|
- evaluating.value = false
|
|
|
- // RuntimeUtils.setCaptureMode()
|
|
|
- }
|
|
|
- )
|
|
|
- RuntimeUtils.endCapture()
|
|
|
+ (evt) => {
|
|
|
+ console.log('调用endEvaluating结束', evt)
|
|
|
+ endloading.value = false
|
|
|
+ evaluating.value = false
|
|
|
+ // RuntimeUtils.setCaptureMode()
|
|
|
+ }
|
|
|
+ )
|
|
|
+ RuntimeUtils.endCapture()
|
|
|
+ }, 500);
|
|
|
}
|
|
|
export const evaluatPlayerStop = playerStop
|
|
|
|